It is a program that accepts your commands (one line at a time)
Executes it.
A shell is a full fledged programming language.
Slightly strange syntax because it has to double up as a command processor.
$ grep ppk /etc/passwd
ppk:x:1000:1000:Piyush P Kurur,,,:/home/ppk:/usr/bin/zsh
$ echo "Hello world"
cmd > filetowrite
cmd < inputfromfile
cmd >> appendtofile
cmd1 | cmd2 | cmd3
$ who | wc -l
grep
: search for a pattern in the file (or stdin)sed
: basic stream editor.
$ who | grep james | sed 's/james/007/'
foo=bar
: Careful no space after =$foo
: the value of the variable foo$ echo *
$ echo \* ; echo 'The * is not a problem here'
$ foo=bar
$ echo "The value of foo is $foo" "$foo"-bar
single quotes: protects the string from shell interpretation
double quotes: protects but variables are substituted
back quote or back tick: Run command and substitute the value.
for i in `seq 10 -1 0`
do
clear
banner $i
sleep 1
done