if CONDITION
then
command1
command2
…
commandn
else
command1
command2
…
commandn
fi
jtony@genoa:~/learn/shell$ cat ifthenelse.sh
#!/bin/bash
if [ $1 = $2 ]
then
echo "$1" is same than "$2"
else
echo "$1" is NOT same with "$2"
fi
echo "This comes after if-then unconditionally."
No comments:
Post a Comment