Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!