Introduction to shell scripting and Linux kernel.
Before getting into shell scripting we must understand what shell is.
So what is shell ?
Shell is an interface between user and kernel.In simple words shell is set of commands that we issue to to interact or communicate with our computer.
Shell not only is a command line interface to the Linux also an interpreter.There are multiple shells available like k-shell,c-shell etc. But Almost all the Linux distributions use bash shell which is developed by GNU project. It combines features from c-shell and k-shell.
So how do we access shell?
In Linux shell is accessed through an application called terminal.Terminal comes pre-installed in every Linux distribution.
What is Shell Scripting ?
Shell script is simply a text file where sequence of Linux commands are placed when it's executed all the commands inside file gets executed one by one.
Shell scripts are used most often for system administration tasks. Shell script automates Linux tasks.
Before stepping into shell scripting you must have knowledge of basic Linux commands like piping,redirecting,chmod and
linux file system as well.
Advantages of Shell Scripting
Ease of development:
You can write powerful scripts in no time.
Easy to learn:
Shell is a high level language.it's Syntax is easy to learn. you can write complex tasks with ease. Quick start, and interactive debugging.
To automate Linux takss
Shell scripting is used to automate the frequent tasks.The tasks that you so on the daily basis.You can certainly reduce your workload with shell scripting
You can execute bash scripts on any Unix like operating system without modification.
Creating simple tools
Being an administrator you will need to create plenty of tools so bash scripting is the answer.