How to display the largest number using bash script out of three

Linux Bash Script

if [[ $# -eq 3 ]]
then
        if [[ $1 -gt $2 ]]
        then
                if [[ $1 -gt $3 ]]
                then
                        echo $1
                else
                        echo $3
                fi
        else
                if [[ $2 -gt $3 ]]
                then
                        echo $2
                else
                        echo $3
                fi
        fi
else
        echo "User entered: $# numbers"
        echo "Input three numbers: Try next time "
fi


 

Execute the Linux Script

./2_largest_number_out_of_three.sh 45 60 32

 

Output of Linux Script

60