# Shell Scripting Tutorial for Beginners. # Introducation
This tutorial is designed for beginners only and This tutorial explains the basics of shell programming by showing some examples of shell programs. Its not help or manual for the shell. While reading this tutorial you can find manual quite useful ( type man bash at $ prompt to see manual pages). Manual contains all necessary information you need, but it won't have that much examples, which makes idea more clear. For that reason, this tutorial contains examples rather than all the features of shell. 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. Before Starting Linux Shell Script Programming you must know **Kernell** **Shelll** **Processl** **Redirectors, Pipes, Filters etc.l**\\
**What's Kernel** Kernel is hart of Linux O/S. It manages resource of Linux O/S. Resources means facilities available in Linux. For eg. Facility to store data, print data on printer, memory, file management etc . Kernel decides who will use this resource, for how long and when. It runs your programs (or set up to execute binary files) It's Memory resident portion of Linux. It performance following task :- **I/O managementl** **Process managementl** **Device managementl** **File managementl** **Memory managementl**
**What's Linux Shell** Computer understand the language of 0's and 1's called binary language, In early days of computing, instruction are provided using binary language, which is difficult for all of us, to read and write. So in O/s there is special program called Shell. Shell accepts your instruction or commands in English and translate it into computers native binary language. This is what Shell Does for US
NOTE: To find your shell type following command **$ echo $SHELL**
**How to use Shell** To use shell (You start to use your shell as soon as you log into your system) you have to simply type commands. Following is the list of common commands.
**Linux Common Commands** NOTE that following commands are for New users or for Beginners only. The purpose is if you use this command you will be more familiar with your shell and secondly, you need some of these command in your Shell script. If you want to get more information or help for this command try following commands For e.g. To see help or options related with date command try **$ date --help** or To see help or options related with ls command (Here you will screen by screen help, since help of ls command is quite big that can't fit on single screen )
**$ ls --help | more**
Syntax: command-name --help Syntax: man command-name Syntax: info command-name See what happened when you type following
**$ man ls** **$ info bash**
NOTE: In MS-DOS, you get help by using /? clue or by typing help command as
**C:\\> dir /?** **C:\\> date /?** **C:\\> help time** **C:\\> help date** **C:\\> help**
# Using Variables and Comments **Create .sh file using this command.** \# touch hello.sh **Now open the file using Linux editor like- nano, vi, vim, and gpedit. you can also use Vs-Code.** \# nano hello.sh