Friends, Let us first understand what is shell?
Shell is a layer on Unix Operating System. Shell is a user interface to Operating System. A user can communicate with Unix operating System through shell. Different types of shells are available with each Unix operating System,
e.g: sh,ksh,bash,rksh,csh etc
The moment you logon to any Unix operating system you are placed in shell, a shell prompt ( # or $). Any information you want to get from operating system or you want to instruct something to operating system, you need to type it as a command on your Shell prompt.
Shell then interprets your request & forward it to kernel.
Now let's understand what is Shell Scripting?
Shell Script is a collection of Unix commands enclosed in a file. A script can be just a collection of Unix basic commands, filter commands or it can be group of Admin commands, programming language construct etc. To Write a script you need to know Unix commands.
Shell is a interpreter. The entire script gets interpreted line by line or instruction by instruction.
There are different methods to executes shell script.
Shell Script is mainly used to automate the system Admin task,
e:g Backup, Multiple User creation, monitoring logs for certain entries, deleting unwanted files, patching, software installation, Connecting to database, creating tools etc.
Ex: Sample_Script1