Deck 8: Working With the Bash Shell

ملء الشاشة (f)
exit full mode
سؤال
Any command that can be executed on the command line can also be placed inside any environment file.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The ____ command can be used to replace characters in a file sent via Standard Input.

A)tr
B)rt
C)ts
D)st
سؤال
You can redirect a file to the Standard Input of a command using the ____ metacharacter.

A)>
B)#
C)|
D)<
سؤال
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.
سؤال
You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.
سؤال
You can use the sed command to remove unwanted lines of text.
سؤال
To see a list of the environment variables and their current values on a system, you can use the ____ command.

A)env
B)get
C)set
D)setenv
سؤال
You can send the Standard Output of one command to another command as Standard Input using the ____ shell metacharacter.

A)<
B)|
C)>
D)#
سؤال
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.

A)~/.bash_profile
B)~/.bash_login
C)/etc/profile
D)~/.profile
سؤال
The ____ command counts the number of lines, words, and characters in a file.

A)pr
B)nl
C)tr
D)wc
سؤال
stderr is represented by the number ____.

A)0
B)1
C)2
D)3
سؤال
The ____ command can be used to extract, manipulate, and format text using pattern-action statements.

A)sed
B)grep
C)awk
D)nl
سؤال
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.

A)#
B)<
C)>
D)|
سؤال
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.
سؤال
Most configuration files on Linux systems are delimited using ____ characters.

A)tab
B)colon
C)space
D)semicolon
سؤال
To see a list of all exported environment and user-defined variables in the shell, you can use the ____ command.

A)env
B)set
C)setenv
D)getenv
سؤال
If you have ____ permission to a shell script, you can execute the shell script like any other executable program on the system.

A)read
B)write and read
C)execute
D)read and execute
سؤال
The ____ escape sequence represents a form feed.

A)\n
B)\f
C)/f
D)/n
سؤال
stdin is represented by the number ____.

A)0
B)1
C)2
D)3
سؤال
The ____ command could be used to view the contents of the environment variable that represents the BASH shell prompt.

A)ls $PWD
B)echo #PWD
C)echo $PS1
D)ls #PS1
سؤال
What are file descriptors? What are the three file descriptors are available to each command that can be manipulated by the BASH shell, and what is the purpose of each?
سؤال
What are shell variables? What are environment and user-defined variables?
سؤال
Match between columns
The normal output of a command.
file descriptors
The normal output of a command.
stderr
The normal output of a command.
environment variables
The normal output of a command.
shell scripts
The normal output of a command.
hashpling
The normal output of a command.
stdin
The normal output of a command.
decision construct
The normal output of a command.
stdout
The normal output of a command.
tee
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
file descriptors
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stderr
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
environment variables
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
shell scripts
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
hashpling
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stdin
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
decision construct
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stdout
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
tee
The information that is processed by the command during execution.
file descriptors
The information that is processed by the command during execution.
stderr
The information that is processed by the command during execution.
environment variables
The information that is processed by the command during execution.
shell scripts
The information that is processed by the command during execution.
hashpling
The information that is processed by the command during execution.
stdin
The information that is processed by the command during execution.
decision construct
The information that is processed by the command during execution.
stdout
The information that is processed by the command during execution.
tee
Labels representing command input and output.
file descriptors
Labels representing command input and output.
stderr
Labels representing command input and output.
environment variables
Labels representing command input and output.
shell scripts
Labels representing command input and output.
hashpling
Labels representing command input and output.
stdin
Labels representing command input and output.
decision construct
Labels representing command input and output.
stdout
Labels representing command input and output.
tee
Any error messages generated by a command.
file descriptors
Any error messages generated by a command.
stderr
Any error messages generated by a command.
environment variables
Any error messages generated by a command.
shell scripts
Any error messages generated by a command.
hashpling
Any error messages generated by a command.
stdin
Any error messages generated by a command.
decision construct
Any error messages generated by a command.
stdout
Any error messages generated by a command.
tee
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
file descriptors
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stderr
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
environment variables
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
shell scripts
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
hashpling
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stdin
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
decision construct
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stdout
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
tee
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
file descriptors
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stderr
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
environment variables
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
shell scripts
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
hashpling
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stdin
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
decision construct
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stdout
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
tee
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
file descriptors
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stderr
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
environment variables
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
shell scripts
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
hashpling
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stdin
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
decision construct
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stdout
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
tee
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.
file descriptors
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.
stderr
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.
environment variables
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.
shell scripts
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.
hashpling
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.
stdin
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
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.
stdout
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.
tee
سؤال
Describe the && and || constructs. How and why are they used?
سؤال
Any command that can take from Standard Input and give to Standard Output is called a(n)____________________ command.
سؤال
Most commands that are run by the shell are run in a separate ____________________, which is created by the current shell.
سؤال
What is a decision construct? What is the most common type of decision construct, and what is the syntax for using it?
سؤال
The test statement ____ would be used to determine if A is numerically greater than B.

A)[ A -g B ]
B)[ A -ge B ]
C)[ A -gt B ]
D)[ A +eq B ]
سؤال
The ____________________ environment variable contains a list of directories to search for executable programs.
سؤال
A case construct must be ended by ____________________.
سؤال
What are shell scripts? Why and how are they executed?
سؤال
The ____________________ command takes user input from Standard Input and places it in a variable specified by an argument.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/32
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 8: Working With the Bash Shell
1
Any command that can be executed on the command line can also be placed inside any environment file.
True
2
The ____ command can be used to replace characters in a file sent via Standard Input.

A)tr
B)rt
C)ts
D)st
A
3
You can redirect a file to the Standard Input of a command using the ____ metacharacter.

A)>
B)#
C)|
D)<
D
4
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
5
You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
6
You can use the sed command to remove unwanted lines of text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
7
To see a list of the environment variables and their current values on a system, you can use the ____ command.

A)env
B)get
C)set
D)setenv
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
8
You can send the Standard Output of one command to another command as Standard Input using the ____ shell metacharacter.

A)<
B)|
C)>
D)#
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
9
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.

A)~/.bash_profile
B)~/.bash_login
C)/etc/profile
D)~/.profile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
10
The ____ command counts the number of lines, words, and characters in a file.

A)pr
B)nl
C)tr
D)wc
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
11
stderr is represented by the number ____.

A)0
B)1
C)2
D)3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
12
The ____ command can be used to extract, manipulate, and format text using pattern-action statements.

A)sed
B)grep
C)awk
D)nl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
13
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.

A)#
B)<
C)>
D)|
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
14
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
15
Most configuration files on Linux systems are delimited using ____ characters.

A)tab
B)colon
C)space
D)semicolon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
16
To see a list of all exported environment and user-defined variables in the shell, you can use the ____ command.

A)env
B)set
C)setenv
D)getenv
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
17
If you have ____ permission to a shell script, you can execute the shell script like any other executable program on the system.

A)read
B)write and read
C)execute
D)read and execute
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
18
The ____ escape sequence represents a form feed.

A)\n
B)\f
C)/f
D)/n
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
19
stdin is represented by the number ____.

A)0
B)1
C)2
D)3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
20
The ____ command could be used to view the contents of the environment variable that represents the BASH shell prompt.

A)ls $PWD
B)echo #PWD
C)echo $PS1
D)ls #PS1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
21
What are file descriptors? What are the three file descriptors are available to each command that can be manipulated by the BASH shell, and what is the purpose of each?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
22
What are shell variables? What are environment and user-defined variables?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match between columns
The normal output of a command.
file descriptors
The normal output of a command.
stderr
The normal output of a command.
environment variables
The normal output of a command.
shell scripts
The normal output of a command.
hashpling
The normal output of a command.
stdin
The normal output of a command.
decision construct
The normal output of a command.
stdout
The normal output of a command.
tee
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
file descriptors
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stderr
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
environment variables
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
shell scripts
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
hashpling
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stdin
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
decision construct
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
stdout
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
tee
The information that is processed by the command during execution.
file descriptors
The information that is processed by the command during execution.
stderr
The information that is processed by the command during execution.
environment variables
The information that is processed by the command during execution.
shell scripts
The information that is processed by the command during execution.
hashpling
The information that is processed by the command during execution.
stdin
The information that is processed by the command during execution.
decision construct
The information that is processed by the command during execution.
stdout
The information that is processed by the command during execution.
tee
Labels representing command input and output.
file descriptors
Labels representing command input and output.
stderr
Labels representing command input and output.
environment variables
Labels representing command input and output.
shell scripts
Labels representing command input and output.
hashpling
Labels representing command input and output.
stdin
Labels representing command input and output.
decision construct
Labels representing command input and output.
stdout
Labels representing command input and output.
tee
Any error messages generated by a command.
file descriptors
Any error messages generated by a command.
stderr
Any error messages generated by a command.
environment variables
Any error messages generated by a command.
shell scripts
Any error messages generated by a command.
hashpling
Any error messages generated by a command.
stdin
Any error messages generated by a command.
decision construct
Any error messages generated by a command.
stdout
Any error messages generated by a command.
tee
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
file descriptors
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stderr
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
environment variables
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
shell scripts
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
hashpling
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stdin
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
decision construct
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
stdout
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
tee
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
file descriptors
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stderr
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
environment variables
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
shell scripts
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
hashpling
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stdin
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
decision construct
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
stdout
A filter command that takes information from Standard Input and sends that information to a file, as well as to Standard Output.
tee
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
file descriptors
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stderr
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
environment variables
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
shell scripts
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
hashpling
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stdin
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
decision construct
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
stdout
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
tee
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.
file descriptors
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.
stderr
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.
environment variables
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.
shell scripts
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.
hashpling
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.
stdin
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
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.
stdout
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.
tee
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
24
Describe the && and || constructs. How and why are they used?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
25
Any command that can take from Standard Input and give to Standard Output is called a(n)____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
26
Most commands that are run by the shell are run in a separate ____________________, which is created by the current shell.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
27
What is a decision construct? What is the most common type of decision construct, and what is the syntax for using it?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
28
The test statement ____ would be used to determine if A is numerically greater than B.

A)[ A -g B ]
B)[ A -ge B ]
C)[ A -gt B ]
D)[ A +eq B ]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____________________ environment variable contains a list of directories to search for executable programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
30
A case construct must be ended by ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
31
What are shell scripts? Why and how are they executed?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
32
The ____________________ command takes user input from Standard Input and places it in a variable specified by an argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 32 في هذه المجموعة.