xxxxxxxxxx
chmod +x file.sh # Give execute permissions to the .sh file
./file.sh # Run the .sh file
xxxxxxxxxx
# Add Permissions to your script to be executable.
chmod +x /path/to/yourscript.sh
# Run your script.
/path/to/yourscript.sh
# Or if you're in the right directory.
./yourscript.sh
xxxxxxxxxx
1. Open the terminal. Go to the directory where you want to create your script.
2. Create a file with .sh extension.
3. Write the script (in the file using an editor).
4. Make the script executable with command: chmod +x <fileName>
5. Run the script using: ./<fileName>
xxxxxxxxxx
./script-name-here.sh #Chage the "script-name-here" to the name of the .sh file.