Script not working in cron but working fine manually

view full story

http://www.unix.com – Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered. The script is as follow: #!/bin/sh for file in file_1.txt file_2.txt file_3.txt do awk '{ print "0" }' $file > tmp.tmp mv tmp.tmp $file done And the cron job I am making is: */2 * * * * /root/folder/test.sh Thanks for the help. (HowTos)