Linux+ Chapter 07

¡Supera tus tareas y exámenes ahora con Quizwiz!

The file descriptor stdin is represented by the number ____.

0

You can redirect a file to the standard input of a command using the ____ metacharacter.

<

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.

>

____ are labels representing command input and output.

File descriptors

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

____ are files that are typically used to create custom programs that perform administrative tasks on Linux systems.

Shell scripts

____ is the normal output of a command.

stdout

T/F - Users can create their own custom variables, called shell variables.

False

To see a list of the environment variables and their current values on a system, you can use the ____ command.

set

Any error messages generated by a command is ____.

stderr

You can send the standard output of one command to another command as standard input using the ____ shell metacharacter.

|

T/F - You can use the sed command to remove unwanted lines of text.

True

To see a list of all exported environment and user-defined variables in the shell, you can use the ____ command.

env

____ is a filter command that takes information from standard input and sends that information to a file, as well as to standard output.

tee

The ____ command can be used to replace characters in a file sent via Standard Input.

tr

Most configuration files on Linux systems are delimited using ____ characters.

Colon

T/F - 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.

False

T/F - In a decision construct, you can have an unlimited number of if then statements.

False

T/F - 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.

False

T/F - You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.

False

T/F - Aliases are shortcuts to commands stored in special variables that can be created and viewed using the alias command.

True

T/F - Any command that can be executed on the command line can also be placed inside any environment file.

True

T/F - The BASH shell assumes stdout in the absence of a numeric file descriptor.

True

T/F - The ENV environment variable represents the location of the BASH run-time configuration file.

True

The test statement ____ would be used to determine if A is numerically greater than B.

[ A -gt B ]

The ____ escape sequence represents a form feed.

\f

The ____ command can be used to extract, manipulate, and format text using pattern-action statements.

awk

The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script, is ____.

hashpling

The information that is processed by the command during execution is ____.

stdin

The ____ command counts the number of lines, words, and characters in a file.

wc

The ____ command could be used to view the contents of the environment variable that represents the BASH shell prompt.

$PS1

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

The file descriptor stderr is represented by the number ____.

2

____ are constructs that alter the flow of a program based on whether a command in the program completed successfully or based on a decision that the user makes given a question posed by the program.

Decision construct

____ are shell variables that are typically set by the system and contain information that the system and programs access regularly.

Environment variables


Conjuntos de estudio relacionados

I can describe travel problems and accidents

View Set

1984 Quiz 1 (Chapter 1-7) Palmer

View Set

Chapter 28: Drugs Used for Diuresis

View Set

fundamentals midterm previous quizzes

View Set

ATI Video Neurocognitive Disorders

View Set

Major Depressive Disorder and Bipolar Disorder

View Set

AP environmental science math formulas

View Set