LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Does the crontab require.... (https://www.linuxquestions.org/questions/linux-general-1/does-the-crontab-require-253067/)

Echo Kilo 11-09-2004 10:18 PM

Does the crontab require....
 
Does the crontab require a shell directive in a script to be run?

In other words, would this work as is:

cp /home/elections/votes .
cat votes | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'>t2
cat t2 | grep NAME | awk -F: '{print $2}' | sort -u > t3
cat /etc/passwd|sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'>t4
cat t4 | awk -F: '{print $5}' | awk -F, '{print$1}' | sed '1,16d' | egrep -v 'VOTES|SALES'|sort -u>t5
cat t5 | tr -s ' ' > t6
diff -y t3 t6;rm t?

trickykid 11-10-2004 07:00 AM

AFAIK yes. Every cron job I've dealt with has to be an executable as well. Test it without it, not like its going to hurt anything if it doesn't work.. ;)

acid_kewpie 11-10-2004 07:01 AM

depends how you try to run it.... cron will run whatever is on the end of the crontab entry, normally this is a bash first or other executable, so that needs to work in it's own right.

and please don't end titles in "..." that implies there's more you're not telling us. so please just tell us in future. thanks


All times are GMT -5. The time now is 07:46 PM.