I had trouble searching for this one because of the word "which"; so, I apologize if the answer is here.
When I give the command
The man page suggests that I would be able to get
Using FreeBSD 12.1-RELEASE-p5 on one machine and FreeBSD 12.1-RELEASE-p10 on another. Seeing this kind of behavior in both places. My goal would be to pick up the return code from
When I give the command
which -s PROGRAM_NAME
or which -a PROGRAM_NAME
, I see responses like: -a: Command not found.
The man page suggests that I would be able to get
which
to use args like -a -s
. Am I doing something wrong here? Or, does the man page not match up with the which(1) provided? I see there is a warning that some shells may have their own which. When using csh, I see this error. If there's a difference in the "which" I don't know how to discover it.Using FreeBSD 12.1-RELEASE-p5 on one machine and FreeBSD 12.1-RELEASE-p10 on another. Seeing this kind of behavior in both places. My goal would be to pick up the return code from
which
to use it in a script as a validation test. Any advice you might give could be helpful. Thanks.