Thursday, 3 November 2016

( Shell Scripting ) check a number to be Positive or negative

#check a number to be Positive or negative
echo "enter the number";
read a
if [ $a -lt 0 ]
then
 echo "Negative";
else
 echo "Positive";
fi

No comments:

Post a Comment