[dundee] Noob Programming Question
Gary Short
gary at garyshort.org
Mon Mar 15 15:37:10 UTC 2010
Hi Guys,
I was wondering if anyone here can give me some help. What I'm trying to do
is to run curl and pipe the output to file1, then after a time t, stop curl
and restart it piping it's output to file2 and so on to fileN, so that I can
use another script to process the files, something like this...
On system_startup:
If args[0]:
Ctr = args[0]
Else:
Ctr = 1
Start curl > /usr/home/gary/results/date_today/file + ctr
While true:
When time_up:
Stop curl
If date_today changes:
Ctr = 1
Else:
Ctr = ctr + 1
Start curl > /usr/home/gary/results/date_today/file + ctr
I also need a script to monitor this first one so that if it dies it can be
restarted, something like...
If script_is_not_running:
Arg = digits_at_end_of_newest_file
Run script arg
Can anyone point me in the right direction on how to do this on Ubuntu
8.04.3 LTS?
Thanks in advance,
Gary
http://www.garyshort.org
http://www.twitter.com/garyshort
More information about the dundee
mailing list