Control Statements in Shell script

shell programming

Control Statements in Shell script Without control statements, execution within a shell scripts flows from one statement to the next in succession. Control statements control the flow of execution in a programming language The three most common types of control statements: – conditionals: if/then/else, case, … – loop statements: while, for, until, do, … – … Read more

Shell script to show calender

Use your vi  editor to create shell script, script.sh . This script runs three echo commands and shows the use of variable evaluation and command substitution. It also prints the calender of the current month. #!/bin/sh echo “Today’s date : `date` ” echo “This month’s calender:” cal `date “+%m 20%y` echo “My shell : $SHELL” … Read more