I see, but, would that be portable? I mean, the which program itself may not be available.
That's correct, it's not portable, and I don't agree with the above advice, also due to the use of backticks (see Calling External Commands More Safely). which is just a short shell script (at least on Debian), it's not magic.
In reply to Re^3: Check for another program availability
by haukex
in thread Check for another program availability
by hrcerq
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |