Deck 6: Introduction to Shell Script Programming

ملء الشاشة (f)
exit full mode
سؤال
The ____ command prints a listing of environment and configuration variables.

A)printenv
B)printvar
C)printf
D)bash
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
To reference a variable,you use a dollar sign ($)in front of it or enclose it in ____.

A)square brackets ([ ])
B)curly brackets ({ })
C)double quotes (" ")
D)angle brackets (< >)
سؤال
In shell scripts,comment lines begin with a(n)____.

A)tilde (~)character
B)dollar ($)sign
C)pound (#)symbol
D)exclamation (!)sign
سؤال
The ____ shell,when compared to the other shells,has a more powerful programming interface.

A)Bourne
B)Bash
C)C
D)Korn
سؤال
A program's high-level language statements are stored in a file called the ____ file.

A)shell
B)script
C)program
D)source
سؤال
Shell scripts run more quickly than compiled programs.
سؤال
Shell scripts can automatically access variables created and assigned on the command line.
سؤال
If a source file contains ____ errors,it cannot be converted into an executable file.

A)syntax
B)debugging
C)compilation
D)logic
سؤال
The Bash shell offers improved features over the older Bourne and Korn shells and is fully backward compatible with the Bourne shell.
سؤال
You use the chexec command to indicate that a (shell script)file can be executed.
سؤال
You should omit spaces when you assign a variable without using single or double quotation marks around its value.
سؤال
A ____ is a name consisting of letters,numbers,or characters and is used to reference the contents of a variable.

A)comment
B)symbolic name
C)label
D)tag
سؤال
When you assign a value to a variable,you might want to evaluate it by displaying its contents via a(n)____ operator.

A)definition
B)echo
C)evaluating
D)print
سؤال
The UNIX-Linux shell acts as a(n)____ when reading script files.

A)compiler
B)interpreter
C)assembler
D)linker
سؤال
____ variables are used to store information about the setup of the operating system,and after they are set up,you typically do not change them.

A)Global
B)Environment
C)Configuration
D)Shell
سؤال
Logic structures are also called ____ structures.

A)decision
B)sequential
C)control
D)programming
سؤال
____ gives the owner read,write,and execute permissions.

A)chmod 155
B)chmod 551
C)chmod 577
D)chmod 755
سؤال
____ variables are those you create at the command line or in a shell script.

A)Global
B)Environment
C)Configuration
D)Shell
سؤال
A high-level language is a computer language that uses English-like expressions.
سؤال
The ____ reads the lines of code that the programmer wrote in the source file and converts them to the appropriate machine-language instructions.

A)compiler
B)linker
C)assembler
D)interpreter
سؤال
The ____ statement simplifies the selection of a match when you have a list of choices.

A)if
B)switch
C)case
D)while
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the primary shell prompt
سؤال
Shell scripts support many shell script ____________________,including those for assigning the contents of a shell variable,for evaluating information,for performing mathematical operations,and for piping or redirection of input-output.
سؤال
The ____________________ shell is similar to the Bash shell in many respects,but has syntax similar to that of C programming.
سؤال
You use the ____________________ command to loop through a range of values.
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that contains the file name containing commands to initialize the shell
سؤال
The ____ statement continues to loop and execute commands or statements as long as a given condition or set of conditions is true.

A)for
B)while
C)esac
D)case
سؤال
The ____ command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs.

A)set
B)export
C)tput
D)trap
سؤال
The ____________________ command,used to run a shell script,includes several options for debugging.
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that contains the absolute path to the Bash shell,such as -bin-bash
سؤال
Logic structures supported by shell scripts include: sequential logic,decision logic,looping logic,and ____________________ logic.
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that identifies the path name for user's home directory
سؤال
____ operators compare the relationship between two values or arguments.

A)Evaluation
B)Comparison
C)Logical
D)Relational
سؤال
With no options,____ displays the current listing of Bash environment and shell script variables.

A)let
B)set
C)sh
D)export
سؤال
Wildcard characters are also known as ____ characters.

A)bogus
B)filler
C)glob
D)search
سؤال
The ____ command enables you to initialize the terminal display or terminal window,to place text and prompts in desired locations,and to respond to what the user selects from the menu.

A)put
B)tput
C)clear
D)tclear
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the path name of the program for the type of shell you are using
سؤال
____________________ are text files that contain sequences of UNIX-Linux commands.
سؤال
____________________ operators are used to assign a value to a variable.
سؤال
The ____________________ variable provides a list of directory locations where UNIX or Linux looks to find executable scripts or programs.
سؤال
What is an algorithm?
سؤال
What is a string variable?
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
bitwise negation operator
سؤال
What are shell variables?
سؤال
What is a glob pattern?
سؤال
What is looping logic?
سؤال
What is a branch instruction?
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
matches exactly one character,except for the backslash and period
سؤال
What is debugging?
سؤال
What is the back quote operator (`)used for?
سؤال
What is the program development cycle?
سؤال
What is an operand?
سؤال
What is a prototype?
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
logical negation operator
سؤال
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the list of path names for directories searched for executable commands
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/55
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 6: Introduction to Shell Script Programming
1
The ____ command prints a listing of environment and configuration variables.

A)printenv
B)printvar
C)printf
D)bash
A
2
To reference a variable,you use a dollar sign ($)in front of it or enclose it in ____.

A)square brackets ([ ])
B)curly brackets ({ })
C)double quotes (" ")
D)angle brackets (< >)
B
3
In shell scripts,comment lines begin with a(n)____.

A)tilde (~)character
B)dollar ($)sign
C)pound (#)symbol
D)exclamation (!)sign
C
4
The ____ shell,when compared to the other shells,has a more powerful programming interface.

A)Bourne
B)Bash
C)C
D)Korn
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
5
A program's high-level language statements are stored in a file called the ____ file.

A)shell
B)script
C)program
D)source
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
6
Shell scripts run more quickly than compiled programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
7
Shell scripts can automatically access variables created and assigned on the command line.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
8
If a source file contains ____ errors,it cannot be converted into an executable file.

A)syntax
B)debugging
C)compilation
D)logic
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
9
The Bash shell offers improved features over the older Bourne and Korn shells and is fully backward compatible with the Bourne shell.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
10
You use the chexec command to indicate that a (shell script)file can be executed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
11
You should omit spaces when you assign a variable without using single or double quotation marks around its value.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
12
A ____ is a name consisting of letters,numbers,or characters and is used to reference the contents of a variable.

A)comment
B)symbolic name
C)label
D)tag
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
13
When you assign a value to a variable,you might want to evaluate it by displaying its contents via a(n)____ operator.

A)definition
B)echo
C)evaluating
D)print
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
14
The UNIX-Linux shell acts as a(n)____ when reading script files.

A)compiler
B)interpreter
C)assembler
D)linker
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
15
____ variables are used to store information about the setup of the operating system,and after they are set up,you typically do not change them.

A)Global
B)Environment
C)Configuration
D)Shell
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
16
Logic structures are also called ____ structures.

A)decision
B)sequential
C)control
D)programming
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
17
____ gives the owner read,write,and execute permissions.

A)chmod 155
B)chmod 551
C)chmod 577
D)chmod 755
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
18
____ variables are those you create at the command line or in a shell script.

A)Global
B)Environment
C)Configuration
D)Shell
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
19
A high-level language is a computer language that uses English-like expressions.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
20
The ____ reads the lines of code that the programmer wrote in the source file and converts them to the appropriate machine-language instructions.

A)compiler
B)linker
C)assembler
D)interpreter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ____ statement simplifies the selection of a match when you have a list of choices.

A)if
B)switch
C)case
D)while
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
22
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the primary shell prompt
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
23
Shell scripts support many shell script ____________________,including those for assigning the contents of a shell variable,for evaluating information,for performing mathematical operations,and for piping or redirection of input-output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
24
The ____________________ shell is similar to the Bash shell in many respects,but has syntax similar to that of C programming.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
25
You use the ____________________ command to loop through a range of values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
26
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that contains the file name containing commands to initialize the shell
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
27
The ____ statement continues to loop and execute commands or statements as long as a given condition or set of conditions is true.

A)for
B)while
C)esac
D)case
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____ command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs.

A)set
B)export
C)tput
D)trap
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
29
The ____________________ command,used to run a shell script,includes several options for debugging.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
30
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that contains the absolute path to the Bash shell,such as -bin-bash
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
31
Logic structures supported by shell scripts include: sequential logic,decision logic,looping logic,and ____________________ logic.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
32
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that identifies the path name for user's home directory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
33
____ operators compare the relationship between two values or arguments.

A)Evaluation
B)Comparison
C)Logical
D)Relational
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
34
With no options,____ displays the current listing of Bash environment and shell script variables.

A)let
B)set
C)sh
D)export
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
35
Wildcard characters are also known as ____ characters.

A)bogus
B)filler
C)glob
D)search
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
36
The ____ command enables you to initialize the terminal display or terminal window,to place text and prompts in desired locations,and to respond to what the user selects from the menu.

A)put
B)tput
C)clear
D)tclear
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
37
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the path name of the program for the type of shell you are using
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
38
____________________ are text files that contain sequences of UNIX-Linux commands.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
39
____________________ operators are used to assign a value to a variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
40
The ____________________ variable provides a list of directory locations where UNIX or Linux looks to find executable scripts or programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is an algorithm?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
42
What is a string variable?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
43
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
bitwise negation operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
44
What are shell variables?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
45
What is a glob pattern?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
46
What is looping logic?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
47
What is a branch instruction?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
48
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
matches exactly one character,except for the backslash and period
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
49
What is debugging?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
50
What is the back quote operator (`)used for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
51
What is the program development cycle?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
52
What is an operand?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
53
What is a prototype?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
54
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
logical negation operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
55
Match each item with a statement below.
a.!
f.SHELL
b.?
g.PATH
c.ENV
h.~
d.PS1
i.BASH
e.HOME
environment variable that holds the list of path names for directories searched for executable commands
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 55 في هذه المجموعة.