Skip to content

Add -s flag to which

Erik Gustafsson requested to merge (removed):add-s-flag-to-which into master

In my work place we use many shellscripts written for BSD/Mac. They often use the which -s flag to check if a command is installed, such as which -s java || echo "You have to install java to run this program"

The -s flag is described on the FreeBSD man-page https://www.freebsd.org/cgi/man.cgi?which(1)

I would like the which -s command in shellscripts written for BSD to also work in Debian. This Merge request therefor adds the -s flag to the which command, to become compatible BSD/Mac shellscripts.

Merge request reports

Loading