Re: redirecting command output depending on exit status

2011-04-21 Thread Riaan Kruger
> > > I have a cron task set up using lockf. > > > > I'd like to redirect one exit status to /dev/null : > I think that the exit status of a command will be after any output of the command to stderr or stdout. So first it will say "This is wrong" and then it will exit giving you the exit code. Th

Re: redirecting command output depending on exit status

2011-04-20 Thread Bastien Semene
Bastien Semene Administrateur Réseau& Système Cyanide Studio - FRANCE Le 20/04/2011 15:01, Ruben de Groot a écrit : On Tue, Apr 19, 2011 at 04:00:52PM +0200, Bastien Semene typed: Hi list, I have a cron task set up using lockf. I'd like to redirect one exit status to /dev/null : "it (loc

Re: redirecting command output depending on exit status

2011-04-20 Thread Ruben de Groot
On Tue, Apr 19, 2011 at 04:00:52PM +0200, Bastien Semene typed: > Hi list, > > I have a cron task set up using lockf. > > I'd like to redirect one exit status to /dev/null : > > "it (lockf command) returns one of the exit codes defined in > sysexits(3), as follows: > > EX_TEMPFAIL T