Shebang

Using env in the Shebang Line The env command is used to find and run the bash interpreter according to the user's environment. This is particularly useful when the script is run on different systems where bash might be located in different directories.

Here’s how you can modify the shebang line to use env:

#!/usr/bin/env bash