OT scripting question

Michael Boman michael.boman at securecirt.com
Mon Apr 28 20:32:46 CEST 2003


On Tue, 2003-04-29 at 01:19, Jeff McKeon wrote:
> hell all,
> 
> I know this is sort of off topic but it's for a script I'm writing to
> use with nagios so I beg forgiveness..
> 
> When using a command like grep that returns an exit status (0 for match,
> 1 for no match, 2 for errors) how i use that exit status in a script. 
> In other words, what variable is assigned the 0, 1 or 2?

echo $?

Best regards
 Michael Boman

-- 
Michael Boman
Security Architect, SecureCiRT Pte Ltd
http://www.securecirt.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list