About 2,050,000 results
Open links in new tab
  1. Bash – Find Largest of Three Numbers - Tutorial Kart

    To find the largest of three numbers in a Bash script, use if elif else statement, along with comparison operators. Examples with detailed explanations are given.

  2. bash - Write a shell script to find the largest among three numbers ...

    Aug 20, 2019 · Write a shell script to find the largest among three numbers. Get user inputs and display the result. Sample input 1: 10 20 30 Sample output 1: 30 is largest number Sample input 2: 10 10 10 Sample

  3. Shell script to find greatest of three numbers - tutorialsinhand

    Feb 19, 2021 · Shell script to find the largest of three numbers using command line arguments: echo $first_num is the greatest number. echo $second_num is the greaatest number. echo $third_num is the greatest number. CODE IMAGE IN CYGWIN: ---FIND THE GREATEST AMONG THREE NUMBERS--- 343 is the greaatest number.

  4. shell - Find biggest of three numbers - Stack Overflow

    Jun 16, 2017 · Try using this script: #!/bin/bash if [ $# -eq 3 ] then if [ $1 -gt $2 ] && [ $1 -gt $3 ] then echo "$1 is Biggest number" elif [ $2 -gt $1 ] && [ $2 -gt $3 ] then echo "$2 is Biggest number" elif [ $3 -gt $1 ] && [ $3 -gt $1 ] then echo "$3 is Biggest number" fi else echo "command line arguments are missing" fi

  5. Largest of three Numbers in Shell (SH) - Learn Loner

    In this shell script, we compare three numbers—num1, num2, and num3—to determine the largest among them. This is achieved using conditional statements. The logic involves sequentially comparing each pair of numbers. If num1 is greater than or equal to both num2 and num3, then num1 is the largest.

  6. Shell script to find greatest of three numbers - Log2Base2

    Let's write a shell script to find the greatest of three numbers. 1. Get three numbers. Say num1, num2, num2. 2. If (num1 > num2) and (num1 > num3) 4. Otherwise, echo "Enter Num2" read …

  7. unix - How to find biggest of three numbers using command line ...

    May 10, 2017 · Write a shell script to find out biggest of three numbers. Assume that inputs are given as command line argument, and if this three numbers are not given show error message as “command line arguments are missing”.

  8. Shell script to find greatest of three numbers

    Jan 27, 2021 · Linux shell program/script to find greatest of three numbers echo "Enter three Integers:" read a b c if [ $a -gt $b -a $a -gt $c ] then echo "$a is Greatest" elif [ $b -gt $c -a $b -gt $a ] then echo "$b is Greatest" else echo "$c is Greatest!"

  9. Shell script to find largest of n numbers - Log2Base2

    Let's write a shell script to find largest of n numbers. 1. Get N. 2. Read N numbers using loop. 3. Set first number as max. 4. From number 2 onwards update the max value if the number > max. 5. Display the result. i= 1. max= 0. echo "Enter Numbers" while [ $i -le $N ] do read num.

  10. LINUX SEHLL program for finding GREATEST OF THREE NUMBERS | Operating ...

    To write a shell program for finding greatest among three numbers. • Get the three numbers to find the biggest number. • if B > C print B is greater or C is greater. • Terminate the program. Thus the shell program to find the greatest among three values is written and executed successfully.

  11. Some results have been removed
Refresh