Connecting Tech Pros Worldwide Help | Site Map

Unix script to sort numbers

Newbie
 
Join Date: Jul 2007
Posts: 23
#1: May 9 '09
Can anyone help me to do this problem?
Question goes like below:


Use C or Borne shell. Take two integer command line arguments. The script should display the numbers between the two integers (including the two numbers) in ascending order if the first number is smaller than the second, and in descending order if the first number is greater than the second. Do proper exception handling in code.

Thanks,
ashitpro's Avatar
Expert
 
Join Date: Aug 2007
Posts: 389
#2: May 11 '09

re: Unix script to sort numbers


Quote:

Originally Posted by pratimapaudel View Post

Can anyone help me to do this problem?
Question goes like below:


Use C or Borne shell. Take two integer command line arguments. The script should display the numbers between the two integers (including the two numbers) in ascending order if the first number is smaller than the second, and in descending order if the first number is greater than the second. Do proper exception handling in code.

Thanks,

Hi there,

This is one of the easiest assignment related to shell script.
Show us your attempts and we'll fix the problem.

Regards,
Ash
Reply


Similar Unix / Linux / BSD bytes