The if statement is exactly what you would think. It test one value against another, then performs actions based on that test. For example, in the following script: #!/usr/bin/ksh x=1 if [[ $x -gt 0 ]];then print "X is greater than 0" else print "X is not greater than 0" fi
The result of that script would be "X is greater than 0" because we tested the value of x and determined it to be greater than (-gt) the value of 0.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE