Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Write a Bourne Shell script called mySeq.sh (which simulates the GNU utility seq ) that prints a sequence of numbers, from FIRST to LAST,

1) Write a Bourne Shell script called "mySeq.sh" (which simulates the GNU utility seq) that prints a sequence of numbers, from FIRST to LAST, in steps of INCREMENT. If only LAST is given, it will print out a sequence of numbers from 1 to LAST in steps of 1. If both FIRST and LAST are given, it will print out a sequence of numbers from FIRST to LAST in steps of 1. If FIRST, INCREMENT and LAST are all given, it will print out a sequence of numbers from FIRST to LAST in steps of INCREMENT. Note: please do not use existing utility seq in your code.

Below is the sample output:

$./mySeq.sh 3

1 2 3

$./mySeq.sh 2 4

2 3 4

$./mySeq.sh 2 3 7

2 5

Hint: you may need to check the number of arguments by reading the value stored in $# .

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

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions