Shell Scripting
bash is Bourne-Again Shell.
Few commands: type -a ls (o/p: ls is /bin/ls)
type -a history => history is a shell built-in command

Hello-World Script(test.sh)
#!/bin/bash
echo "Hello World!"
save the file with above content and give +x permission using "chmod +x tesh.sh" and execute using "./test.sh"
First line is called "shebang" or a "bang" line.

Variables and printing variables:
#!/bin/bash
echo "Enter your name:"
read NAME
echo "Thank you $NAME"
In above script NAME is a variable. read is used to get INPUT from the user and store it in variable NAME and print the value using $NAME











Learn & Earn