When one of the scripts I intend to use warn me about this "/usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead." in unstable-forth-coming Debian, I googled out and found some 'saying' about using command and which in stackoverflow. I realized ISPConfig use quite a lot of which in its software, so should this be changed?
I usuall use type instead of which. Type is a builtin command in bash shell. I like to add the -a parameter, to print all the commands found with that name. Code: $ LANG=C type -a type type is a shell builtin taleman@puhuri:~ $ LANG=C type -a which which is /usr/bin/which which is /bin/which taleman@puhuri:~
It (which) will actually be depcrecated if it still hasn't especially in the new forthcoming version of Debian or Ubuntu that I have tested. By what I have read so far, command -v is the correct way and that is most probably why which is being deprecated. Easy to find and fix but it is up to ISPConfig developer to decide since most coders always say, don't fix what is not broken (yet).