Use of Semicolons in Shell Script

shell programming

Use of Semicolons in Shell Script Instead of being on separate lines, statements can be separated by a semicolon (;) – For example: if grep “UNIX” myfile; then echo “Got it”; fi – This actually works anywhere in the shell. % cwd=`pwd`; cd $HOME; ls; cd $cwd