Question: Project 2 - 5 ESTIMATED TIME: 2 0 minutes OBJECTIVE: Use shell metacharacters. DESCRIPTION: In this hands - on project, you use and protect shell

Project 2-5
ESTIMATED TIME: 20 minutes
OBJECTIVE: Use shell metacharacters.
DESCRIPTION: In this hands-on project, you use and protect shell metacharacters.
1
Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.
2
At the command prompt, type date;who and press Enter to run the date command immediately followed by the who command. Use the information in Table 2-7 to describe the purpose of the ; metacharacter.
3
At the command prompt, type echo This is OK and press Enter to display a message on the terminal screen.
4
At the command prompt, type echo Don't do this and press Enter. Which character needs to be protected in the previous command? Press the Ctrl+c keys to cancel your command and return to a BASH shell prompt.
5
At the command prompt, type echo "Don't do this" and press Enter. What is displayed on the terminal screen?
6
At the command prompt, type echo Don\'t do this and press Enter. What is displayed on the terminal screen?
7
At the command prompt, type echo $SHELL and press Enter to view the expansion of a variable using a shell metacharacter. What is displayed on the terminal screen? Next, type echo $TEST and press Enter to find out what happens when a variable that does not exist is used in a command. What is displayed?

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!