First off just would like to say hello I'm new to this forum but it looks very interesting and I'm sure I will learn a lot from the various people here.
I'm new to UNIX and more so scripting in it. I have an assignment for a class that's mostly done online and my teacher is of no help whatsoever telling us he would review steps to do it and hasn't. My group including me is clueless on how to accomplish our task I could really use a hand. We are using Putty and writing the scripts using VI
1-
I need to write this particular script using the korn shell. It will take a number from the command line and perform the math in section 2(below). If no command line argument is given, the script should ask for a number between 1 and 20.
2-
The out of the script needs to be
a) The number
b) The square of the inputted number
c) The cube of the number
d) The square root of the number derived from (c)
So for example...It will ask
Please enter a number: "input 1-20"
You entered the number "XX"
The Square root of your number is "XXX"
The Cube of your number is "XXXXX"
The Qquare root of "XXXX" is "XX"
There's more kickers like if the number you enter isn't 1-20 it clears the screen and asks again for a number. Having an exit for a user other than entering a number. Using at least 1 sub function. Oye my head hurts just typing it.
Any help is seriously honestly appreciated.