LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-09-2004, 10:18 PM   #1
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Rep: Reputation: 30
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?
 
Old 11-10-2004, 07:00 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
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..
 
Old 11-10-2004, 07:01 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does the site require a makeover? abattoir LQ Suggestions & Feedback 56 12-03-2005 07:33 PM
require a little help with mdk10.1 walkerx Mandriva 4 04-10-2005 03:22 PM
newbie require guidance arunsri Slackware 7 03-18-2005 11:16 AM
does 2.6 require a boot loader? MaulingMonkey Linux - General 2 01-08-2005 06:30 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration