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
For any query or issue, feel free to discuss on http://discuss.eduguru.in