Deck 7: Working With the Bash Shell
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/45
العب
ملء الشاشة (f)
Deck 7: Working With the Bash Shell
1
The BASH shell assumes stdout in the absence of a numeric file descriptor. _________________________
True
2
The ENV environment variable represents the location of the BASH run-time configuration file. _________________________
True
3
The file descriptor stdin is represented by the number ____.
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
A
4
You can use the sed command to remove unwanted lines of text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
5
Users can create their own custom variables, called shell variables. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
6
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
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
A) env
B) get
C) set
D) setenv
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
8
The ____ command counts the number of lines, words, and characters in a file.
A) pr
B) nl
C) tr
D) wc
A) pr
B) nl
C) tr
D) wc
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
9
You can redirect a file to the standard input of a command using the ____ metacharacter.
A) >
B) #
C) |
D) <
A) >
B) #
C) |
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
10
You can send the standard output of one command to another command as standard input using the ____ shell metacharacter.
A) <
B) |
C) >
D) #
A) <
B) |
C) >
D) #
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
11
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
12
The file descriptor stderr is represented by the number ____.
A) 0
B) 1
C) 2
D) 3
A) 0
B) 1
C) 2
D) 3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
13
Most configuration files on Linux systems are delimited using ____ characters.
A) tab
B) colon
C) space
D) semicolon
A) tab
B) colon
C) space
D) semicolon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
14
You are limited to using one pipe | metacharacter on the command line to pipe information from one command to another command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
15
The ____ command can be used to replace characters in a file sent via Standard Input.
A) tr
B) rt
C) ts
D) st
A) tr
B) rt
C) ts
D) st
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
16
In a decision construct, you can have an unlimited number of if then statements. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
17
The ____ command can be used to extract, manipulate, and format text using pattern-action statements.
A) sed
B) grep
C) awk
D) nl
A) sed
B) grep
C) awk
D) nl
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
18
Any command that can be executed on the command line can also be placed inside any environment file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
19
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) |
A) #
B) <
C) >
D) |
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
20
Aliases are shortcuts to commands stored in special variables that can be created and viewed using the alias command. _________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
21
A case construct must be ended by ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
22
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
A) env
B) set
C) setenv
D) getenv
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
23
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 ]
A) [ A -g B ]
B) [ A -ge B ]
C) [ A -gt B ]
D) [ A +eq B ]
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
24
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Files that are typically used to create custom programs that perform administrative tasks on Linux systems.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
25
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
A) read
B) write and read
C) execute
D) read and execute
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
26
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Labels representing command input and output.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Labels representing command input and output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
27
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
A) ls $PWD
B) echo #PWD
C) echo $PS1
D) ls #PS1
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____________________ environment variable contains a list of directories to search for executable programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
29
Most commands that are run by the shell are run in a separate ____________________, which is created by the current shell.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
30
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
A filter command that takes information from standard input and sends that information to a file, as well as to standard output.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
A filter command that takes information from standard input and sends that information to a file, as well as to standard output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
31
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The normal output of a command.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The normal output of a command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
32
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.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.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
33
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The first line in a shell script, which specifies the pathname to the shell that interprets the contents of the shell script.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
34
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Shell variables that are typically set by the system and contain information that the system and programs access regularly.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
35
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
A) ~/.bash_profile
B) ~/.bash_login
C) /etc/profile
D) ~/.profile
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ____________________ command takes user input from stdin and places it in a variable specified by an argument.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
37
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Any error messages generated by a command.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
Any error messages generated by a command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
38
Match each term with the correct statement below.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The information that is processed by the command during execution.
a.hashpling
f.decision construct
b.tee
g.shell scripts
c.environment variables
h.stdout
d.stdin
i.file descriptors
e.stderr
The information that is processed by the command during execution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
39
Any command that can take standard input and transform it into standard output is called a(n) ____________________ command.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
40
The ____ escape sequence represents a form feed.
A) \n
B) \f
C) /f
D) /n
A) \n
B) \f
C) /f
D) /n
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
41
What are shell variables? What are environment and user-defined variables?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is a decision construct? What is the most common type of decision construct, and what is the syntax for using it?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
43
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?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
44
What are shell scripts? Why and how are they executed?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck
45
Describe the while construct. How and why is it used?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 45 في هذه المجموعة.
فتح الحزمة
k this deck