In the simplest terms, a shell script is a file containing a series of commands. The shell reads this file and carries out the commands as though they have been entered directly on the command line.
- BASH ( Bourne-Again SHell ) – Most common shell in Linux. It’s Open Source.
- CSH (C SHell) – The C shell’s syntax and usage are very similar to the C programming language.
- KSH (Korn SHell) – Created by David Korn at AT & T Bell Labs. The Korn Shell also was the base for the POSIX Shell standard specifications.
- TCSH – It is an enhanced but completely compatible version of the Berkeley UNIX C shell (CSH).
Here I am scripting a shutdown command .
# vim shutdown.sh
#!/bin/bash sudo shutdown -h now :wq #now type ls you can see the file shutdown.sh #to run type sh shutdown.sh Its similar to DOS batch file .