[lug] return code
John Hernandez
John.Hernandez at noaa.gov
Thu Jun 6 09:28:32 MDT 2002
$? will contain the return code from rpm.
It's based on these results:
grep something non-existant-file >/dev/null
$? = 2
grep something real-file >/dev/null
$? = 1
Is this simple test sufficient?
-John
Hugh Brown wrote:
> When I run
>
> rpm -q package-name >/dev/null
>
> if the return code in $?, the return code of rpm or the return code of
> the redirect to /dev/null
>
> Hugh
>
>
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
--
- John Hernandez - Network Engineer - 303-497-6392 -
| National Oceanic and Atmospheric Administration |
| Mailstop R/OM12. 325 Broadway, Boulder, CO 80305 |
----------------------------------------------------
More information about the LUG
mailing list