How to create scripts in terminal

Fol­low three sim­ple steps to auto­mate your terminal.

  • Cre­ate a script
  • Set the permissions
  • Exe­cute the script

Cre­ate a script test.sh

$vi test.sh

ls -la
echo 'Hello Bash!'

Set the permissions

$sudo chmod 777 test.sh

Exe­cute the script

$./test.sh

You may also like...