Question: LINUX LAB 1 Parameters & Variables Although variables are mostly used in scripts and read by programs, you can experiment with them on the command

LINUX LAB 1 Parameters & Variables

Although variables are mostly used in scripts and read by programs, you can experiment with them on the command line.

1. Assign your name to the variable named myname and use echo to display the value of myname when it is unquoted, quoted using double quotation marks, and quoted using single quotation marks. [Show your work]

2. Use the readonly builtin to make the myname variable you created in the previous step a readonly variable and then assign a new value to it. What happens? [Show your work]

3. What is the value of your HOME keyword variable? [Show your work]

Demonstrate that the tilde holds the same value as HOME. List the contents of your home directory using a tilde. [Show your work]

4. The PATH keyword variable specifies the directories in the order bash should search them when it searches for a script or program you run from the command line. What is the value of your PATH variable? [Show your work]

Append the absolute pathname of the bin directory that is a subdirectory of your home directory to the PATH variable. What does this change allow you to do more easily? [Show your work]

5. The PS1 keyword variable holds the value of your primary shell prompt. Change the value of this variable so that your prompt is simply a $ followed by a SPACE when you are working as yourself (standard user). [Show your work]

6. The date utility displays the date and time. Write and execute group and subshell command that displays the date and time, the name of your home directory, and the value of your PATH variable. [Show your work]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!