ITMS 456 Chapter 7 Final
What operator below is known as the NOT operator?
!
What character combination at the start of a shell script are referred to as a hashpling, and allow for the specification of the shell that interprets the contents of the script?
#!
You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.
False
What two BASH environment variables represent the current working directory, and the absolute pathname of the current shell, respectively?
SHELL PWD
You can use the sed command to remove unwanted lines of text.
True
The ability to extract, manipulate, and format text using pattern action statements belongs to which command below?
awk
The default BASH shell prompt is set by an environment variable. What command can be used to view this variable?
echo $PS1
In an if construct, what statements are optional?
else elif
The environment variables that are set by default and their current values can be viewed with what command?
set
Select the metacharacter that can be used to send the standard output of one command to another command as standard input:
|
What environment file is always executed immediately after login for all users on the system, and sets most environment variables, such as HOME and PATH?
/etc/profile
What two files below are the first two BASH environment files to be executed?
/etc/profile /etc/bashrc
What number represents the stdin file descriptor?
0
What number represents the stderr file descriptor?
2
In order to redirect a file to the standard input of a command, what metacharacter should be used?
<
Select the test statement that can be used to determine if A is numerically greater than B:
[ A -gt B ]
A list of all exported environment and userdefined variables in a shell can be viewed with what command below?
env
What permissions are required to execute a shell script in a manner similar to any other executable program on the system?
read and execute
Which command can be used to count the number lines, words, and characters in a file?
wc
Select the two commands below that will provide the number of lines in a file, and the number of characters in a file, respectively:
wc c wc l