Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

The type of organization and its style of leadership

Answered: 1 week ago