[dundee] Noob Programming Question
Robert Ladyman
it at file-away.co.uk
Mon Mar 15 16:29:27 UTC 2010
You might do better with logrotate (it looks like you are just changing ctr
when the date changes)
> 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
>
>
>
>
>
>
>
>
> _______________________________________________
> dundee GNU/Linux Users Group mailing list
> dundee at lists.lug.org.uk http://dundeelug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/dundee
> Chat on IRC, #tlug on irc.lug.org.uk
>
--
Robert Ladyman
File-Away Limited, 32 Church Street, Newtyle
Perthshire, PH12 8TZ SCOTLAND
Registered in Scotland, Company Number SC222086
Tel: +44 (0) 1828 898 158
Mobile: +44 (0) 7732 771 649
http://www.file-away.co.uk
More information about the dundee
mailing list