answersLogoWhite

0


Best Answer

arg_cnt=$#

arg_list=$*

biggest=$1

if [ $arg_cnt -eq 0 ]; then

echo "$RF there should be minimum 1 argument"

exit 1

fi

for each_arg in $arg_list

do

if [ $each_arg -gt $biggest ]; then

biggest=$each_arg

fi

done

echo " Biggest number is : $biggest \n"

exit 0

User Avatar

Wiki User

βˆ™ 12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Find largest of n numbers using shell programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How to write a program that ask user to enter numbers until user enter- 0 then find the biggest of entered numbers in C programming using while or do while?

int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i>largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);


How do you display qBasic programming if their is no MS-DOS prompt?

If you are using windows, MSDOS shell is integrated by default..


What are the three largest numbers that can be made using the digits?

depends on your answer


What is the second largest numeral using 3 numbers?

998.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


Largest 5 digit number using all even numbers?

88,888


What is the largest six digit number you can write using the numbers 381724?

874321 is the largest number made from all these digits.


What is the largest 6 digit number using only even numbers using each number only once?

998,000


Using each digit one time and only one time What are the three largest numbers that can be written using the digits 1 4 7 0 5 and 9?

The three largest numbers (in descending order) would be... 975410, 975401 & 975104


What is the largest 5 digit number with 3 in the thousands place using numbers 1 through 9 without repeating the numbers?

93,876


How many 17 digit numbers are there using 0-9?

The possibilities are all the counting numbers from the largest 16-digit one to the largest 17-digit one.99,999,999,999,999,999 minus 9,999,999,999,999,999 = 90,000,000,000,000,000


What is the largest number you can make by using the four numbers 5 1 9 2?

Arranging them in the order 9521 produces the largest number. Using operands, using the exponential function (if available) would create the largest number. [(2 ^5)^9]^1= 35184372088832