Question: Objective Develop UNIX shell script. Description Write a shell script that accepts at most three arguments. The arguments are all integers: a, b and n.
Objective Develop UNIX shell script. Description Write a shell script that accepts at most three arguments. The arguments are all integers: a, b and n. The script should print all terms of Fibonacci sequence to nth term.
The script should print (your ScriptName) : accept three arguments only message if number of arguments is more than 3 then exit. If number of arguments is less than 3, the script should ask the user to input the other needed integers. Then, the script prints values of Fibonacci sequence from first to nth terms on terminal and ask user if he/she interests to try different value of n. The script will print the result and ask the user continuously until the user choose to exit, then the script will terminate. Sample Run (you can make different format of your output): ./fib.sh 1 2 6 1 2 3 5 8 13 Do you want to try another n (yes/no): yes Insert n 8 1 2 3 5 8 13 21 34 Do you want to try another n (yes/no): no Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
