Answered step by step
Verified Expert Solution
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 Task points Write a Bash script that will output the following information: a exit code exit status A non 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: $ scriptsh Expected output: Zero: NonZero: Task 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 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: $scriptsh Expected output: User: sparky Home Directory for sparky: homesparky Current Working Directory: homesparkywhateverdirectoryscriptrunsfrom First in Path: usrlocalsbin Shell: binbashTask 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 and the temperature is 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:
Task Task points
Write a Bash script that will output the following information:
a exit code exit status
A non 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:
$ scriptsh
Expected output:
Zero:
NonZero: Task 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 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:
$scriptsh
Expected output:
User: sparky
Home Directory for sparky: homesparky
Current Working Directory: homesparkywhateverdirectoryscriptrunsfrom
First in Path: usrlocalsbin
Shell: binbashTask 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
and the temperature is 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:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started