Introduction to Bash Shell Scripting
Bash( Bourne Again Shell) is the default shell script for RHEL. It was developed by Steven Bourne of AT & T for GNU Project. IT incorporates all major features of it predecessors- ssh( UNIX, default), csh, ksh, & tcsh.
From the core of any system: Hardware->Kernel->Shell->Application.
In bash shell scripting, variables are of two types:
- Local Shell Variable
Values of such variables are available to the currently shell only.
- Environment Shell Variable
Values of such variables are available to the current shell as well as sub-shells.
[email@example.com ~]$set | less
This command displays list of both the local and environment shell variable.
This command lists the environment variables only.
Some typical environment variables:
HOME: This variable contains path of the current user’s home directory.
PATH: This variable contains command’s search path.
HISTSIZE: This variable contains command’s history size.