[cfe-dev] 'sw_vers' on Linux

Csaba Raduly rcsaba at gmail.com
Sun Apr 28 22:56:00 PDT 2013


Hi all,

On Fri, Apr 26, 2013 at 7:18 PM, John Smith  wrote:
> On Fri, Apr 26, 2013 at 7:05 PM, Bob Wilson  wrote:
>>
>> Does the version of "which" on Linux and BSD support the -s (silent) option?  That would be slightly cleaner than redirecting to /dev/null.
>>
> Gnu '/usr/bin/which' on my Fedora 17 system does not. But why worry
> about possibly non-portable options like '-s', when ">/dev/null 2&1"
> will work on all *nix flavors ?

Just FYI: Solaris 'which' writes its error message to stdout ("No
sw_vers found in ..."), instead of writing nothing to stdout and an
error to stderr :(

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



More information about the cfe-dev mailing list