Question: In this problem set, you will create a BASH script that will declare and initialize a variable with a specific value. You will then recall
In this problem set, you will create a BASH script that will declare and initialize a variable with a specific value. You will then recall that variable in a sentence that will be output to the screen.
To do before scripting:
Create a folder homescripts where you can store all of your scripts. You'll need to make the 'scripts' directory in your home directory.
Write a BASH script that will do the following IN ORDER as they are written:
Use VIM to create a BASH script named 'variable.sh in your homescripts directory
Add a header to the script that shows the following information:
Script Name: variable.sh
Author: Your Name
Last Edited: date of last modification
Purpose: a simple synopsis of the script's purpose and what it does
Declare and initialize a variable named 'course' and set it equal to the string 'CCU CSCID
Declare and initialize a variable named 'term' and set it equal to the string 'Spring
Declare and initialize a variable named 'pset' and set it equal to the integer
Declare and initialize a variable named 'name'. Ask the user their name and set their response as 'name'.
Use 'echo' statements to output the following while using your variables:
"Hello, I am I am currently enrolled in CCU CSCID Spring completing Problem Set #
The items in bold should be written to call a variable course term, pset, and name so that it reads as above after the variables have been written in
You will need to save your script, make it executable, then run it Here's what you'll be submitting to Moodle for grading. PLEASE make sure you follow these steps or I cannot grade your screenshot submission.
Clear your terminal screen enter 'clear'
Open your completed script in VIM so the whole script shows
Capture a screenshot using the TealVirt 'Capture Screenshot Package' option of your script variablesh code. Be sure to show all of the code, including the header and any comments you add to make it readable. Upload that screenshot as in PDF format.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
