Define::Shell Scripting
Posted on Sep 2, 2008 01:06:40 AM
Normally shells are interactive. It accept command from you and execute them. However, if you store (sequence of ‘n’ number of commands) sequence of commands to text file and tell the shell to execute text file instead of entering the commands, known as a shell program or shell script.
It is defined as “Shell script is a series of command(s) stored in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file”.
Each shell script consists of the following:-
* Shell commands such as if..else, do..while
* Linux text processing utilities such as grep, awk, cut
* Linux binary commands such as w, who, free etc
What are the advantages of Shell script?
1) It is the shell that lets you run different commands without having to type the full pathname to them even when they do not exists in current directory
2) The shell expands wildcard characters, thus saving you laborious typing
3) It gives you ability to run previously run commands without having to type the full command again
4) It is the shell that does input, output and error redirection