[dundee] Noob Programming Question

Gary Short gary at garyshort.org
Mon Mar 15 16:57:15 UTC 2010


Hi Robert,

Thanks for this, but it looks like logrotate only runs once a day and I
would have needed something more "real time". However, I've given this more
though and decided that what I was trying to do was cr at p. What I actually
want is a message queue.

Thanks for your response though.
Gary

> -----Original Message-----
> From: dundee-bounces at lists.lug.org.uk [mailto:dundee-
> bounces at lists.lug.org.uk] On Behalf Of Robert Ladyman
> Sent: 15 March 2010 16:29
> To: Tayside Linux User Group
> Subject: Re: [dundee] Noob Programming Question
> 
> 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
> 
> 
> _______________________________________________
> 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
> 
> !DSPAM:5,4b9e605868362194785539!





More information about the dundee mailing list