Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a shell script called hello that takes one argument at the command line: hello < the persons name > Within the script, count backwards

Write a shell script called

hello

that takes one argument at the command line:

hello < the persons name >

Within the script, count backwards from 10, displaying each number; and then end with "Hello,

< the persons name >, I am a HAL 9000". Your application should be able to handle up to

three values, e.g, Donald, Donald Trump, or Mr. Donald Trump can all be valid input.

Next, populate an array called presidents and fill it with the following values:

Lyndon B. Johnson

Richard Nixon

Gerald Ford

Jimmy Carter

Ronald Reagan

George H.W. Bush

Bill Clinton

George W. Bush

Barack Obama

Donald J. Trump

Then traverse the array, printing out each value thusly:

Lyndon B. Johnson 36th president

Richard Nixon 37th president

Gerald Ford 38th president

and so on.

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Conduct a needs assessment. page 283

Answered: 1 week ago