CSC 360
Programming Assignment #9
Spring 2013
Due Date: 4/22/2013
1. Write a shell
script named 'order.sh' that will display the numbers entered on the
command line in increasing order. If no values are provided, it
should produce usage instructions instead.
Hint: Investigate
the 'sort' command and how you can arrange for it to operate on the
numbers from the command line.
2.
Write a shell script named 'triangle.sh' that will determine what
type of triangle, if any, is formed by the three integers entered on
the command line. The script should provide usage instructions in
the event that the input provided is incorrect (fewer that three
values, negative values, etc.)
3.
Write a shell script named 'primes.sh' that will print all of the
prime integers less than or equal to the integer provided on the
command line. Usage instructions should be provided in the event
that there is no command line parameter provided or the value
provided is not positive.
Hint:
Write a function named 'is_prime' that returns 0 if its argument is
a not a prime integer and 1 if it is a prime.