Introduction to UNIX Lab_bash4.sh Continuing out study of bash scripting, create the script below (in RED) using vi. Fix any problems you find as best you can. Be sure to email me for assistance if...

I need to get the script completed.


Introduction to UNIX Lab_bash4.sh Continuing out study of bash scripting, create the script below (in RED) using vi. Fix any problems you find as best you can. Be sure to email me for assistance if needed. Deliverable for Homework Create the file Lab_bash4.sh – Paste a screen shot of vi showing the file. Be sure to show the entire script for full credit. Execute Lab_bash4.sh – Paste a screen shot of the executed file using ./ format. Show the entire executed script for full credit. #!/bin/bash # elif statements – and data entry options #This first option enters the data into the command launching the script by entering the data on the execute line. #For example ./script_4.sh 18. #Note 18 is read in the script using the $1 argument. See BASH Help Sheet for details. if [ $1 -ge 18 ] then echo You may go to the party. else echo You may not go to the party. fi echo # This second data entry option uses READ echo echo #Below is the second way to enter data in a bash script. In this case, you ask the user to enter a number, then use that number in the script. echo "Next please enter a number between 15 and 25". #This stops the script and asks the user to enter a number read num #This takes that number and enters it into the bash variable ‘num’ if [ $num -ge 18 ] then echo "You may go to the party" else echo "You may not go to the party" fi echo echo #6 #Enter a command below to display the name of this file. Use the HELP Sheet below to find the correct ARGUMENT to use. echo “This is Homework script file XXX “ # Replace XXX with the correct command to display the file name #END of Script 1 BASH HELP SHEET SAMPLE SCRIPT:
Aug 18, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here