Ubuntu bash scripts

Bash scripting is a powerful way to automate tasks in Linux.

Bash scripts typically have a .sh file extension,
To create a script type
nano myscript.sh
and paste two lines and save the script
!/bin/bash
echo “Hello!”


Use the chmod command to make the script executable:
chmod +x myscript.sh

Navigate to the directory where your script is located and execute the script using commands
.\myscript.sh
or
sh myscript.sh