Question: Please include the commands and codes. Thank you. 1. Assign your name to the variable named myname and use echo to display the value of
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. (Refer to "Parameter sub- stitution" on page 302 of Sobell and "Quoting the $" on page 302 of Sobell.) 2. Use the readonly (Sobell, page 305) 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? 3. What is the value of your HOME (Sobell, page 307) keyword variable? Demonstrate that the tilde ( Sobell, page 307) holds the same value as HOME. List the contents of your home directory using a tilde. 4. The PATH (Sobell, page 308) 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? 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? 5. The PS1 (Sobell, page 309) keyword variable holds the value of your pri- mary 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 and a # followed by a SPACE when you are working with root privileges. 6. The date (Sobell, page 62) utility displays the date and time. Write and exe- cute a shell script that displays the date and time, the name of your home directory, and the value of your PATH variable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
