How to create scripts in terminal

Follow three simple steps to automate your terminal.

  • Create a script
  • Set the permissions
  • Execute the script

Create a script test.sh

$vi test.sh

ls -la
echo 'Hello Bash!'

Set the permissions

$sudo chmod 777 test.sh

Execute the script

$./test.sh

You may also like...