Skip to content

Shellscript compatibility with BSD and Mac, for "which -s"

Erik Gustafsson requested to merge klirktag/debianutils:which-s-flag into master

In my work place we use many shellscripts written for BSD/Mac. They often use the which -s flag for silent, 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 which -s flag, in debian, for compatibility with shellscripts written on BSD and Mac. This Merge request therefor adds the -s flag to the which command also on debian.

Edited by Erik Gustafsson

Merge request reports

Loading