Where Online Learning is simpler!
Chapter 5
Linux Shell Scripting
Learn UNIX by examples
Type and executate the Linux commands below:
$
$ cat ./if-statement.sh #!/bin/sh # Purpose: To demonstrate the if-elif-else-statement between two integer values. # This values of VALUE1 AND VALUE2 are compared and the result is displayed. # Author: Wahid Lutfy # CopyRight © MyWebUnivesity.com VALUE1=5 VALUE2=10 # Find the smaller value between 5 and 10. # Then, display the result of the comparison. if [ ${VALUE1} -lt ${VALUE2} ] then echo "The value of ${VALUE1} is smaller than the value of ${VALUE2}." else echo "The value of ${VALUE2} is smaller than the value of ${VALUE1}." fi
Back to Chapter 5 Shell Programming
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™