Make Linux/Unix Script Portable With #!/usr/bin/env As a Shebang

Originally published at: https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html

You may notice that most shell and Perl script starts with the following line:
#!/bin/bash
OR
#!/usr/bin/perl