Term
|
Definition
A shell metacharacter used to pipe Standard Output from one command to the Standard Input of another command. |
|
|
Term
|
Definition
A shell metacharacter used to obtain Standard Input from a file. |
|
|
Term
|
Definition
A shell metacharacter used to redirect Standard Output and Standard Error to a file. |
|
|
Term
|
Definition
A command used to create special variables that are shortcuts to longer command strings. |
|
|
Term
|
Definition
A variable that is altered by loop constructs to ensure that commands are not executed indefinitely. |
|
|
Term
|
Definition
A special construct used in a shell script to alter the flow of the program based on the outcome of a command or contents of a variable. Common decision constructs include if, case, &&, and ||. |
|
|
Term
|
Definition
A command used to display or echo output to the terminal screen. It might utilize escape sequences. |
|
|
Term
|
Definition
A command used to display a list of exported variables present in the current shell, except special variables. |
|
|
Term
|
Definition
The files used immediately after login to execute commands; they are typically used to load variables into memory. |
|
|
Term
|
Definition
The variables that store information commonly accessed by the system or programs executing on the system; together, these variables form the user environment. |
|
|
Term
|
Definition
The character sequences that have special meaning inside the echo command. They are prefixed by the \ character. |
|
|
Term
|
Definition
A command used to send variables to subshells. |
|
|
Term
|
Definition
The numeric labels used to define command input and command output. |
|
|
Term
|
Definition
A command that can take from Standard Input and send to Standard Output. In other words, a filter is a command that can exist in the middle of a pipe. |
|
|
Term
|
Definition
The first line in a shell script, which defines the shell that will be used to interpret the commands in the script file. |
|
|
Term
|
Definition
A special construct used in a shell script to execute commands repetitively. Common decision constructs include for and while. |
|
|
Term
|
Definition
A string of commands connected by | metacharacters. |
|
|
Term
|
Definition
A command used to read Standard Input from a user into a variable. |
|
|
Term
|
Definition
The process of changing the default locations of Standard Input, Standard Output, and Standard Error. |
|
|
Term
|
Definition
A command used to view all variables in the shell, except special variables. |
|
|
Term
|
Definition
The text files that contain a list of commands or constructs for the shell to execute in order. |
|
|
Term
|
Definition
A file descriptor that represents any error messages generated by a command. |
|
|
Term
|
Definition
A file descriptor that represents information input to a command during execution. |
|
|
Term
|
Definition
A file descriptor that represents the desired output from a command. |
|
|
Term
|
Definition
A shell started by the current shell. |
|
|
Term
|
Definition
A command used to take from Standard Input and send to both Standard Output and a specified file. |
|
|
Term
|
Definition
A statement used to test a certain condition and generate a True/False value. |
|
|
Term
|
Definition
A command used to transform or change characters received from Standard Input. |
|
|
Term
|
Definition
The variables that are created by the user and are not used by the system. These variables are typically exported to subshells. |
|
|
Term
|
Definition
An area of memory used to store information. Variables are created from entries in environment files when the shell is first created after login, and are destroyed when the shell is destroyed upon logout. |
|
|
Term
|
Definition
|
|
Term
Because Standard Error and Standard Output represent the results of a command and Standard Input represents the input required for a command, only Standard Error and Standard Output can be redirected to/from a file. True or False? |
|
Definition
|
|
Term
Before a user-defined variable can be used by processes that run in subshells, that variable must be _______________
a. imported
b. validated by running the env command
c. exported
d. redirected to the BASH shell |
|
Definition
|
|
Term
The alias command can be used to make a shortcut to a single command. True or False? |
|
Definition
|
|
Term
Which of the following files is always executed immediately after any user logs in to a Linux system and receives a BASH shell?
a. /etc/profile
b. ~/.bash_profile
c. ~/.bash_login
d. ~/.profile |
|
Definition
|
|
Term
Which command could you use to see a list of all environment and user-defined shell variables as well as their current values?
a. ls /var
b. env
c. set
d. echo |
|
Definition
|
|
Term
Every if construct begins with if and must be terminated with _______________.
a. end
b. endif
c. stop
d. fi |
|
Definition
|
|
Term
Which of the following will display the message welcome home if the cd /home/user1 command is successfully executed?
a. cd /home/user1 && echo "welcome home"
b. cat "welcome home” || cd /home/user1
c. cd /home/user1 || cat "welcome home"
d. echo "welcome home” && cd /home/user1 |
|
Definition
|
|
Term
The current value for the HOME variable is displayed by which of the following commands? (Choose all that apply.)
a. echo HOME=
b. echo ~
c. echo $HOME
d. echo ls HOME |
|
Definition
|
|
Term
Which of the following file descriptor numbers represents stdout?
a. 2
b. 0
c. 1
d. 3 |
|
Definition
|
|
Term
Which of the following operators reverses the meaning of a test statement?
a. #!
b. -o
c. -a
d. ! |
|
Definition
|
|
Term
What would be the effect of using the alias command to make an alias for the date command named cat in honor of your favorite pet?
a. It cannot be done because there already is an environment variable cat associated with the cat command.
b. It cannot be done because there already is a command cat on the system.
c. When you use the cat command at the command prompt with the intention of viewing a text file, the date appears instead.
d. There is no effect until the alias is imported because it is a user-declared variable. |
|
Definition
|
|
Term
How do you indicate a comment line in a shell script?
a. There are no comment lines in a shell script.
b. Begin the line with #! .
c. Begin the line with ! .
d. Begin the line with #. |
|
Definition
|
|
Term
You have redirected Standard Error to a file called Errors. You view the contents of this file afterward and notice that there are six error messages. After repeating the procedure, you notice that there are only two error messages in this file. Why?
a. After you open the file and view the contents, the contents are lost.
b. The system generated different Standard Output.
c. You did not append the Standard Error to the Error file, and as a result it was overwritten when the command was run a second time.
d. You must specify a new file each and every time you redirect because the system creates the specified file by default. |
|
Definition
|
|
Term
The sed and awk commands are filter commands commonly used to format data within a pipe. True or False? |
|
Definition
|
|
Term
What is wrong with the following command string: ls /etc/hosts >listofhostfile?
a. Nothing is wrong with the command.
b. The file descriptor was not declared; unless 1 for standard output or 2 for standard error is indicated, the command will fail.
c. The ls command is one of the commands that cannot be used with redirection. You must use | to pipe instead.
d. The file listofhostfile will always only contain standard error because a file descriptor was not declared. |
|
Definition
|
|
Term
Which of the following is not necessarily generated by every command on the system? (Choose all that apply.)
a. Standard Input
b. Standard Deviation
c. Standard Output
d. Standard Error |
|
Definition
|
|
Term
Which construct can be used in a shell script to read Standard Input and place it in a variable?
a. read
b. sum
c. verify
d. test |
|
Definition
|
|
Term
A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are remaining objects to process. True or False? |
|
Definition
|
|
Term
What does >> accomplish when entered on the command line after a command?
a. It redirects both Standard Error and Standard Output to the same location.
b. It does not accomplish anything.
c. It redirects Standard Error and Standard Input to the same location.
d. It appends Standard Output to a file. |
|
Definition
|
|
Term
Consider the following shell script:
echo -e "What is your favorite color?--> \c" read reply if ["$REPLY" = "red" -o "$REPLY" = "BLUE"] then ech "The answer is red or blue." else echo "The answer is not red nor blue." fi
What would be displayed if a user executes the program in question 20 and answered Blue when prompted?
a. The answer is red or blue.
b. The answer is not red nor blue.
c. The code would cause an error.
d. The answer is red or blue. The answer is not red nor blue. |
|
Definition
|
|