Hi,
I want to modifiy the hour in the crontab AIX 5.3 for this line:
Input:
00 22 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
Output:
30 20 * * * /outillage/script_exploit/bin/SavOffline.ksh > /dev/null 2>&1
With the awk or sed function through a ssh -q <serveur> <cmd>
Thanks
#!/usr/bin/bash
#modify cron tab file
ssh -q <serveur> <cmd>
cut -f1,2 -d" " /root/cronsample | paste - /root/crontab | awk -F" " '{print $1,$2,$5,$6,$7,$8 } ' > /tmp/tmp.txt
cp /tmp/tmp.txt /etc/crontab
rm /tmp/tmp.txt
sorry because i've alitlle experience but i tried to help you as i can
this script i test it in linux ubuntu you can change the path of files