2 Max of 2 Number in Shell Script

Program:

#!/bin/bash 
echo "Program to Check max Num:";

echo "Enter a Number:";
read s1;

echo "Enter a Number:";
read s2;

echo $s1,$s2;

if [ $s1 -gt $s2 ]
then
  echo "$s1 is bigger";
else
  echo "$s2 is bigger";
fi	



Output:



Previous
Next Post »