Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

Shell/Bash scripts are written in shell programming language and run in terminal. They often tend to be small and used for small tasks such as automating tasks. For more information read here or here.


Example


# Create the script
Inanzzz-MBP:mix inanzzz$ nano my_bash_script

# You cannot run it like this
Inanzzz-MBP:mix inanzzz$ my_bash_script
-bash: my_bash_script: command not found

# You can run it like this but need to grant permission
Inanzzz-MBP:mix inanzzz$ ./my_bash_script
-bash: ./my_bash_script: Permission denied

# Grant permission
Inanzzz-MBP:mix inanzzz$ chmod 755 my_bash_script

# Run it
Inanzzz-MBP:mix inanzzz$ ./my_bash_script
This is my very first bash script!!!