Day 15 of My ALX Software Engineering Journey: Bash Script Projects
Wow , it’s been a long day , just completed my ALX project for yesterday , they really meant it when they said you must be ready do hard things 😂. Most of the projects I did today were centered on bash scripts . It was my second time writing bash scripts but I just learnt it properly today . Let me briefly run you through what it is
Bash Script
It’s a shell script that contains executable commands that can be run on a Unix shell environment.
Above is an example of what a bash script looks like . The first line reads #!/bin/bash ; this is read as shebang! slash bin slash bash .
bin/bash indicates that the interpreter of this bash script is bash. After the first line you can now add any shell command below and save the file .
Note that when these bash scripts are saved they are saved as non executable files , hence you must make them executable by using this command “chmod +x filename”. This command makes the bash script executable , a notable indicator that the file is now executable is that the color of the file text changes to another color .
That’ll be all for today until next time.