Browse - Programming Tips - Linux: portable script

Date: 2019feb4
OS: Linux
Language: bash

Q.  Linux: portable script

A.  The traditional way of starting scripts was

#!/usr/bin/sh
Or
#!/usr/bin/perl
But hardcoding a path is always bad so the modern way is:
#!/usr/bin/env bash
Or
#!/usr/bin/env perl
Which uses the env command to find and run your language.