Linux Test 3- 7,8,9 Flashcards
(107 cards)
To prevent a file from being cleared by the BASH shell and append output to the existing output, you can specify three > metacharacters alongside the file descriptor.
F
You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.
F
You can use the sed command to remove unwanted lines of text.
T
Any command that can be executed on the command line can also be placed inside any environment file.
T
Given the syntax command && command, the command on the left of the && construct is executed only if the command on the right of the && construct completed successfully.
F
The BASH shell assumes stdout in the absence of a numeric file descriptor
T
Users can create their own custom variables, called shell variables
F
The ENV environment variable represents the location of the BASH run-time configuration file.
T
Aliases are shortcuts to commands stored in special variables that can be created and viewed using the alias command.
T
In a decision construct, you can have an unlimited number of if then statements.
F
The file descriptor stdin is represented by the number ____.
0
The file descriptor stderr is represented by the number ____.
2
You can use the BASH shell to redirect standard output and standard error from the terminal screen to a file on the filesystem using the ____ shell metacharacter followed by the absolute or relative pathname of the file
>
You can redirect a file to the standard input of a command using the ____ metacharacter.
<
The ____ command can be used to replace characters in a file sent via Standard Input.
tr
You can send the standard output of one command to another command as standard input using the ____ shell metacharacter.
|
The ____ command counts the number of lines, words, and characters in a file.
wc
The ____ command can be used to extract, manipulate, and format text using pattern-action statements.
awk
Most configuration files on Linux systems are delimited using ____ characters.
colon
To see a list of the environment variables and their current values on a system, you can use the ____ command.
set
The ____ command could be used to view the contents of the environment variable that represents the BASH shell prompt.
echo $PS1
To see a list of all exported environment and user-defined variables in the shell, you can use the ____ command.
env
The ____ 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
If you have ____ permission to a shell script, you can execute the shell script like any other executable program on the system.
read and execute