Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a bash script that accepts a person's name as a command-line argument and simply prints out the following greeting: Good day, ! Nice

image text in transcribed
1. Write a bash script that accepts a person's name as a command-line argument and simply prints out the following greeting: "Good day, ! Nice to meet you!", where is a positional parameter (i.e., a command-line argument) passed to the script. If the user does not enter a command-line argument when invoking this shell script, you will simply output: "Hope you have a great day!", without any name displayed. This bash script should be called rec04A.sh. SAMPLE OUTPUT (input in bold): $./rec04A.sh Fernando Good day, Fernando! Nice to meet you! ./rec04A.sh Hope you have a great day! 2. Write a bash script that (1) prompts the user to enter a Linux command and reads in the user's input, (2) prints out a meaningful message with the user's entered command to be executed, and finally (3) executes the user's entered command. The Linux command is to be read in, not passed as a command-line argument. This bash script should be called rec04B.sh SAMPLE OUTPUT (input in bold): $/rec04B.sh Enter Linux command to perform: 1s Command to be executed: Ls a.out Lab01A.c Lab02B.shminorl.c minor2.c

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

More Books

Students also viewed these Databases questions

Question

What does ERP stand for?

Answered: 1 week ago

Question

=+5. Who or what is affected by this situation?

Answered: 1 week ago

Question

7. What decisions would you make as the city manager?

Answered: 1 week ago

Question

8. How would you explain your decisions to the city council?

Answered: 1 week ago