When I issue
alias --help I get this output:
alias: usage: alias [-p] [name[=value] ... ]
As I understand, all you need to do is to type an alias and provide the actual path to the script file, like this:
alias scr = /usr/local/tools/some_script.sh
However, I noticed that sometimes 2 paths are being provided when creating aliases - for example, I issued
alias scr command on a corporate machine and got this output:
alias scr = 'sudo /bin/sh /usr/local/tools/some_script.sh'
What is the purpose of introducing additional path
/bin/sh in this case?
The /bin/sh contains only a symlink to bash directory:
ls -l /bin/sh lrwxrwxrwx 1 root root 4 Aug 6 2017 /bin/sh -> bash