Date: Sun, 10 Mar 2002 06:50:02 -0800 (PST) From: Peter Pentchev <roam@ringlet.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/35717: which(1) returns wrong exit status for multiple arguments Message-ID: <200203101450.g2AEo2F85178@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/35717; it has been noted by GNATS. From: Peter Pentchev <roam@ringlet.net> To: wolfram schneider <wosch@FreeBSD.org> Cc: bug-followup@FreeBSD.org Subject: Re: bin/35717: which(1) returns wrong exit status for multiple arguments Date: Sun, 10 Mar 2002 16:41:14 +0200 On Sat, Mar 09, 2002 at 03:21:05PM -0800, wolfram schneider wrote: > > >Number: 35717 > >Category: bin > >Synopsis: which(1) returns wrong exit status for multiple arguments > >Originator: wolfram schneider > >Description: > The new c version of which(1) command returns wrong exit > status for multiple arguments. > > $ which foobar cat > /bin/cat > $ echo $? > 1 > > which should returns true if any of the arguments are found, > false if none are found. FWIW, this is consistent with the 'which' built-in command of csh, tcsh and zsh. Bash's 'type' built-in, though, returns 0 in this case, exactly as the Perl version of which(1) in RELENG_4 does. I do not know how this is with other shells; are there any standards on the return value of which(1)? G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 I had to translate this sentence into English because I could not read the original Sanskrit. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203101450.g2AEo2F85178>