Monday, November 19, 2012

Shell scripting is a powerful tools such as awk, sed , perl etc.

I assumes you have at least working knowledge of Linux i.e. Basic commands like how to create, copy remove files/directories etc or how to use editor like vi or mcedit and login to your system. But not expects any programming language experience.

Before going to start Shell scripting we should know about Linux Operating System.


Where I can use Linux ?

you can use Linux as Server OS or Stand alone OS or your PC.

As a Server OS provides different services to Clients.

Server is 

Stable 
Robust 
Secure
High Performance

Linux offers all the above characteristics plus open source and Free OS.

Linux Can be used as :

== Stand alone workstation
== File Server 
== Print Server 
== Web Server 
== Proxy Server
== DHCP Server
== Firewall
== Mail Server
== Embedded Server
== Appliance
== NIS , NFS , Samba 


What is Kernal  ???

Kernal is Heart of Linux, It manages resources of Linux Operating System, Resources means facilities available in Linux 

== Facilily to store data, print data on printer, memory , journaling , File Management,etc


Kernal does following task.

== I/O Management
== Process Management
== Device Management
== File Management
== Memory Management


What is Shell ???

Computer understand the language of 0's and 1's called Binary language.

In early days of computing, instructions are provided using binary language, Which is difficult to all of us, to read and write ,Shell is interpreter and special program which accepts your instruction or commands in High Level Language(English)
It checks first and validate IF its correct then passed to Kernal.

Shell is not part of System Kernal but uses the system kernal to executes programs, Create Files etc.


Some of very common shell used today:

1. BASH ( Bourne Again Shell) : Developed by Brian Fox and Chet           
Samey used in Linux

2. CSH (C Shell) : Developed by Bill joy used in BSD Unix

3. KSH ( Korn Shell) : Developed By David Korn nad user AT & T Unix


you can find all available shell in your linux system

# cat /etc/shells




What is Shell Script ?

Generally Shells are interactive means shell accept command from you and execute them, But If you use command in sequential order and save these commands to text file and tell the shell to execute this file instead of entering the commands,This is know as Shell Script.

Definition :

Shell script is a series of command written in plain text file.

Shell script is just like batch file is MS-DOS but have more power then the MS-DOS batch file.



Why to write Shell Script ?

== Shell Script can take input from user, file and output them on screen 
== Useful to create our own commands.
== Save lots of time 
== To automate same task of day today life
== System administration part can also be automated.











No comments:

Post a Comment