≡ Menu

Shell Script To Find Largest Among 3 Integers (Numbers) Given As Arguments

{ 7 comments… add one }
  • deep March 27, 2012, 4:53 am

    what is meaning of elif

  • Anonymous February 16, 2012, 6:59 am

    what is the pupose of $# in the program

  • dick-head February 9, 2012, 8:48 pm

    HAHA sysadmn got that one

  • poo October 28, 2010, 1:42 pm

    write a shell script that uses any encryption method to encrypt a file

  • loganathan May 26, 2010, 6:27 am

    i need ordinary program for linux progran for find biggest among 3 numbers using command line arguments… please help me…

  • jacob January 28, 2009, 11:17 am

    It is quite helpful to know how the argument list can be easily handled. Thank you very much !! I was totally confused to see a lot of complex scripts. But, this one really helped me.

  • sysadmn January 9, 2009, 8:48 pm

    Um,
    echo -e "$a\n$b\n$c" | sort -rn | head -1
    or


    big = $a;
    [ $b -gt $big ] && big=$b;
    [ $c -gt $big ] && big=$c;
    echo $big

Security: Are you a robot or human?

Leave a Comment