Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 0 1 0 2 0 3 0 4 0 5 Task 0 2 ( 1 0 points ) Write a Bash script that will

Task 0102030405 Task 02(10 points)
Write a Bash script that will output the following information:
a 0 exit code (exit status)
A non-0 exit code (exit status)
Don't simply put in your own number inside the script. The script must do something to get that
number and then display the exit status.
Expected input (use the actual name for your script):
$ ./script.sh
Expected output:
Zero: 0
Non-Zero: 2 Task 03(10 points)
Write a Bash script that will prompt for a name, the user types it in and hits enter, it then greets
them accordingly. Task 04(10 points)
Write a Bash script that will return the following information using environment variable values:
The current user
The current user's home directory
The current working directory
The first path in the current $PATH variable (only the first value)
The current shell
Sparky is used as an example. When your script runs, it should display the information for the
user running the script.
Expected input (use the actual name for your script):
$./script.sh
Expected output:
User: sparky
Home Directory for sparky: /home/sparky
Current Working Directory: /home/sparky/whatever_directory_script_runs_from
First in Path: /usr/local/sbin
Shell: /bin/bashTask 05(15 points)
Write a Bash script that takes in the following information from the user and outputs it
in the given format:
User's name
A date they specify (note the format)
City name
Temperature
Note the difference in date format between the input value and the output value.
Expected output:
Hello, Bill. I see you are from the city of Allendale. Today is August 04,
2026, and the temperature is 117 degrees.
Note: The bold characters are just used to highlight that the substitution took place
(what the user entered), you do NOT need to format the letters in bold.
Write a Bash script that will output the following information:
image text in transcribed

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

explain the nature and importance of IFRS.

Answered: 1 week ago

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

2 What are the advantages and disadvantages of job evaluation?

Answered: 1 week ago

Question

1 Name three approaches to job evaluation.

Answered: 1 week ago