#!/bin/sh

  • Must be placed at the start of each shell script
  • Tells the system that the commands that follow are to be executed by the bourne shell

Likewise with #!/usr/bin/python, this tells system that the commands that follow are to be executed as python

Each shell file usually have an extension .sh

Save the script and make it executable

  • <font style=“font-family: SFMono-Medium , “SF Mono” , “Segoe UI Mono” , “Roboto Mono” , “Ubuntu Mono” , Menlo , Courier , monospace;color: rgb(122,134,154);letter-spacing: 0.0px;“>chmod +x filename.sh

Then execute the script by

  • ./filename.sh
  • sh filename.sh