Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

B) script2.sh: Write a shell script that prints out the numbers of the Fibonacci series. This series of numbers is one where every number is

image text in transcribed

B) script2.sh: Write a shell script that prints out the numbers of the Fibonacci series. This series of numbers is one where every number is the sum of the previous two numbers before it. For example, the first 10 number of the series is {0, 1, 1, 2, 3, 5, 8, 13, 21, 34}. The series is infinite, so assume that one command line argument is given to your script which is the total number of Fibonacci numbers to display. If a '1' is given, have it print off just the first number. If a '2' is given, have it just print off the first two numbers. If a '3' or bigger is given, have it print off the first two numbers, then have your code calculate the rest automatically. Assume that a logical number will always be given to you (don't worry about checking to see if the number is bigger than 0, for example). As an example, if you run your script using the command ./script2.sh 5, your script should display to the screen the following: 0 1 1 2 3

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

Explain the service recovery paradox.

Answered: 1 week ago