Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a Write a shell script that accepts at most three arguments. The arguments are all integers: a, b and n. The script should print all

image text in transcribed
image text in transcribed
image text in transcribed
a 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. Fibonacci sequence work as follow: n = 0 Fib(n) = b n1 Fibon - 1) + Fibn - 2) 7 = 2,3,4...... 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, Jordan University of Science and Technology NES 202 - Introduction to UNIX Fall 2020-2021 Programming Assignment #2 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. Fibonacci sequence work as follow: n = 0 Fib(n) = ni n = 2,3,4 {rio con Fibon 3 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 126 1235 8.13 VIS Description W 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. Fibonacci sequence work as follow: n=0 Fib(n) = b n=1 Fibon-1) + Fib(n - 2) n= 2,3,4....... a 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

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

Step: 3

blur-text-image

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

What is operatiing system?

Answered: 1 week ago