Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2011 09:36:09 +0200
From:      Riaan Kruger <>
Subject:   Re: redirecting command output depending on exit status
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> > 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.

The only thing I can think of is to write a wrapper script which in effect
parses out the error message  for example:
command | grep -v "offending message" > logfile


Want to link to this message? Use this URL: <>