JoseManimala/Notes

Shell Script Basics
A shell is an access point to your operating system and kernel(heart of the OS!!). Any command that is typed in this screen is a shell command. Now a shell script is a set of shell commands put into a file so that they can be run together. This process is called batch processing. Use any editor you have. Save the file as anything you want but the standard method is to save the file as .sh for shell-script. Now type the commands in making sure that only one command comes on one line. To execute a shell script you can use the $exec .sh command or use the ./ .sh command. If it says execute permission denied, you have to change the permissions. just type chmod u+x .sh. The command means allow user(u) to(+) execute(x) .sh Using variables in shell scripts can be a little tricky. But here is a simple way $n = 10 stores the value 10 to n. $n = n+1 increments the value of n. Its very simple to do. $~ echo $n will print the value of n. storing string to variable is easy $ name='HELLO'.
 * Most of us know how to write shell scripts, but when i was a Newbie i had a lot of trouble trying to figure out how to write a script that can do more than just printing my name on screen.
 * Lets look at the basics
 * what is a shell script?
 * Creating a shell script:
 * Executing a shell script:
 * Variables in shell scripts:
 * Basic shell commands:
 * echo - print something on screen
 * read - to read from screen
 * expn 2+3 - will add two and three