Scripts

Shebang

#!/bin/sh
  • First line of the script
  • Specifies which shell to run the script in

exit

exit [n]
  • Causes the script to exit with the specified return code

source

source filename [arguments]
. filename [arguments]
  • Reads and executes commands from a file
  • Runs the commands within the current shell

Misc

  • Optionally use the .sh file extension for Bash scripts