Bash Structure
Bash script starts with #! referred as the shebang followed by /bin/bash it actually tells the path of the interpreter to execute the commands in the script.
echo: echo is a built-in command in Bash, which is used to display the standard output by passing the arguments. It is the most widely used command for printing the lines of text/String to the screen.
Sample Script
Let's start to create our first hello world bash script.
Save the file and we need to give executable permission for running.
After we need to run our script using below command.
Last updated