[lug] return code
Hugh Brown
hugh at brownclan.org
Thu Jun 6 11:06:17 MDT 2002
Sufficient to determine it isn't the redirect. Thank you. I'm still
curious as to more of the detail about how that decision is made (though
I am reluctant to go digging through the bash source since I'm not much
of a programmer at all).
Hugh
On Thu, 2002-06-06 at 11:28, John Hernandez wrote:
> $? 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 |
> ----------------------------------------------------
>
> _______________________________________________
> 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
More information about the LUG
mailing list