[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: soliciting opinions about potential new cron/at features.



On Thu, 25 Feb 1999 20:20:20 +0100 (CET), Remco Blaakmeer <remco-blaakmeer@quicknet.nl> said:
>
> You could easily use sed to parse it:
>
> sed -e 1d -e 's/^.*[Jj][Oo][Bb] \([^ ]*\) .*$/\1/'
>
> Use this command in some sort of pipe. It will:
> - delete the first line
> - on every other line (there is only one other line), replace the whole
>   line with the word after the string 'job ', where 'job' is not case
>   sensitive.

Of course it's just a SMOP and whatever level of heuristic you like, but
I should mention that you can't assume that it will always be two lines
long, or that the job id will be on the second line.  For DGUX these
don't hold if there was already a job scheduled at the time your job
requested.

If I were writing this program I'd have it look for /\bjob\s+(\S+)/i and
I'd require that there be only one match for that in all of at's output
(both stdout and stderr).

-- 
Roderick Schertler
roderick@argon.org


Reply to: