Question
In linux, in bash scripting, write if cluase where you already have two vars, x and y, and you print "great" if x is greater than y, "less" if x is smaller than y, and "equal" otherwise.
if [ $x -gt$y ]; then
echo "great"
elif [ $x -lt$y ]; then
echo "less"
else
echo "equal"
fi

Question
In linux, in bash scripting, write if cluase where you already have two vars, x and y, and you print "great" if x is greater than y, "less" if x is smaller than y, and "equal" otherwise.
?

Question
In linux, in bash scripting, write if cluase where you already have two vars, x and y, and you print "great" if x is greater than y, "less" if x is smaller than y, and "equal" otherwise.
if [ $x -gt$y ]; then
echo "great"
elif [ $x -lt$y ]; then
echo "less"
else
echo "equal"
fi
If you want to change selection, open document below and click on "Move attachment"

7. Shell Scripting
its full form can contain as much as: 5 X=10 Y=5 if test "$X" -gt "$Y" ; then echo "$X is greater than$Y" elif test "$X" -lt "$Y" ; then echo "$X is less than$Y" else echo "$X is equal to$Y" <span>fi Now let us create a script that interprets its arguments. Create a new script called backup-lots.sh , containing: #!/bin/sh for i in 0 1 2 3 4 5 6 7 8 9 ; do cp $1$1.BAK-\$i done Now cr

#### Summary

status measured difficulty not learned 37% [default] 0

No repetitions