Deck 7: Advanced Shell Programming

ملء الشاشة (f)
exit full mode
سؤال
The ____ operator of the test command,combines two expressions and tests a logical OR relationship between them.

A)|
B)||
C)-O
D)-o
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
The line in the script for setting the Bash shell is: ____.

A)#!/bin/bash
B)!#/bin/bash
C)#/bin/bash
D)!/bin/bash
سؤال
After creating a flowchart,the next step in designing a program is to write the program code.
سؤال
The program development cycle begins with creating specifications for a program.
سؤال
A .bash_logout file in each Bash user's home directory executes commands when the user logs out.
سؤال
The .bashrc file is a hidden file contained in ____ directory.

A)the root
B)your home
C)the /usr
D)the /home
سؤال
When you create a script,you should include the command that sets the particular shell to use on ____.

A)the configuration file
B)your login script
C)the first line of the script
D)the last line of the script
سؤال
In a flowchart,a(n)____ is used to represent a decision.

A)diamond
B)rectangle
C)circle
D)arrow
سؤال
____ is a multifunction tool that enables you to manage openSUSE from one location.

A)User Manager
B)YaST
C)Control Panel
D)MC
سؤال
To view a list of the files in a directory,including the hidden files,you should enter ____.

A)ls -l
B)ls -r
C)ls -h
D)ls -a
سؤال
Pseudocode is a design tool only,and is never processed by the computer.
سؤال
Each record in the -etc-passwd file is simply a record with variable-length fields separated by ____.

A)dashes (-)
B)commas (,)
C)semicolons (;)
D)colons (:)
سؤال
In UNIX-Linux,all shells support the same commands and programming statements.
سؤال
In a flowchart,a(n)____ is used to indicate process flow.

A)diamond
B)rectangle
C)circle
D)arrow
سؤال
For your own account,the shell that is set up by default is established by the system administrator in the ____ file.

A)/etc/shell
B)/etc/passwd
C)/etc/shadow
D)/etc/default
سؤال
The second step in the program development cycle is ____.

A)creating program specifications
B)coding the program
C)the design process
D)debugging
سؤال
A ____ is a logic diagram that uses a set of standard symbols to visually explain the sequence of events from the start of a process to its end point.

A)flowchart
B)map
C)block chart
D)pseudocode
سؤال
In a flowchart,a(n)____ is an on-page connector to continue process flow.

A)diamond
B)rectangle
C)circle
D)arrow
سؤال
In a flowchart,a(n)____ is used to represent a process.

A)diamond
B)rectangle
C)circle
D)arrow
سؤال
Each step in the program is represented by a(n)____ in the flowchart.

A)block
B)arrow
C)label
D)symbol
سؤال
____________________ enable you to determine the type of data needed for input,the processes that must be performed,and the output requirements.
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and can be read
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
logical AND
سؤال
Two popular and proven analysis tools are used to help you design your programs to meet the program specifications: the flowchart and ____________________.
سؤال
A function name differs from a variable name because a function name is followed by a set of ____.

A)parentheses
B)curly brackets
C)square brackets
D)angle brackets
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
logical negation
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
performs a relational integer test
سؤال
What are pseudocode instructions used for?
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
tests for a nonzero string length
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
compares the first file in the argument with the second file to determine if the first file is newer
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and is a regular file
سؤال
____________________ instructions are similar to actual programming statements.
سؤال
The ____________________ that connect the symbols in a flowchart represent the direction in which the program flows.
سؤال
What are flowcharts used for?
سؤال
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and its size is greater than zero
سؤال
You can define functions from the command line by first entering the name of the function and then completing the ____________________ to define it.
سؤال
The -____________________-bashrc file sets default functions and aliases.
سؤال
To format record output you can use the translate utility,____.

A)tr
B)trns
C)trans
D)translate
سؤال
A simple way to delete a record using ____ is with the -d (delete)option.

A)awk
B)sed
C)test
D)tr
سؤال
What is a Boolean operator?
سؤال
The clear command is a useful housekeeping utility for clearing the screen,but you can use a faster method.Describe this alternative method.
سؤال
How can you view the most recent command's exit status?
سؤال
What is a shell function?
سؤال
What is the test command used for?
سؤال
If you are using the Bash shell,what scripts are run automatically when you log in?
سؤال
How can you set defaults for using the vi editor?
سؤال
What does "input validation" mean?
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/48
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 7: Advanced Shell Programming
1
The ____ operator of the test command,combines two expressions and tests a logical OR relationship between them.

A)|
B)||
C)-O
D)-o
D
2
The line in the script for setting the Bash shell is: ____.

A)#!/bin/bash
B)!#/bin/bash
C)#/bin/bash
D)!/bin/bash
A
3
After creating a flowchart,the next step in designing a program is to write the program code.
False
4
The program development cycle begins with creating specifications for a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
5
A .bash_logout file in each Bash user's home directory executes commands when the user logs out.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
6
The .bashrc file is a hidden file contained in ____ directory.

A)the root
B)your home
C)the /usr
D)the /home
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
7
When you create a script,you should include the command that sets the particular shell to use on ____.

A)the configuration file
B)your login script
C)the first line of the script
D)the last line of the script
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
8
In a flowchart,a(n)____ is used to represent a decision.

A)diamond
B)rectangle
C)circle
D)arrow
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
9
____ is a multifunction tool that enables you to manage openSUSE from one location.

A)User Manager
B)YaST
C)Control Panel
D)MC
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
10
To view a list of the files in a directory,including the hidden files,you should enter ____.

A)ls -l
B)ls -r
C)ls -h
D)ls -a
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
11
Pseudocode is a design tool only,and is never processed by the computer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
12
Each record in the -etc-passwd file is simply a record with variable-length fields separated by ____.

A)dashes (-)
B)commas (,)
C)semicolons (;)
D)colons (:)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
13
In UNIX-Linux,all shells support the same commands and programming statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
14
In a flowchart,a(n)____ is used to indicate process flow.

A)diamond
B)rectangle
C)circle
D)arrow
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
15
For your own account,the shell that is set up by default is established by the system administrator in the ____ file.

A)/etc/shell
B)/etc/passwd
C)/etc/shadow
D)/etc/default
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
16
The second step in the program development cycle is ____.

A)creating program specifications
B)coding the program
C)the design process
D)debugging
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
17
A ____ is a logic diagram that uses a set of standard symbols to visually explain the sequence of events from the start of a process to its end point.

A)flowchart
B)map
C)block chart
D)pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
18
In a flowchart,a(n)____ is an on-page connector to continue process flow.

A)diamond
B)rectangle
C)circle
D)arrow
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
19
In a flowchart,a(n)____ is used to represent a process.

A)diamond
B)rectangle
C)circle
D)arrow
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
20
Each step in the program is represented by a(n)____ in the flowchart.

A)block
B)arrow
C)label
D)symbol
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
21
____________________ enable you to determine the type of data needed for input,the processes that must be performed,and the output requirements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
22
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and can be read
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
23
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
logical AND
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
24
Two popular and proven analysis tools are used to help you design your programs to meet the program specifications: the flowchart and ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
25
A function name differs from a variable name because a function name is followed by a set of ____.

A)parentheses
B)curly brackets
C)square brackets
D)angle brackets
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
26
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
logical negation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
27
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
performs a relational integer test
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
28
What are pseudocode instructions used for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
29
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
30
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
tests for a nonzero string length
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
31
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
compares the first file in the argument with the second file to determine if the first file is newer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
32
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and is a regular file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
33
____________________ instructions are similar to actual programming statements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
34
The ____________________ that connect the symbols in a flowchart represent the direction in which the program flows.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
35
What are flowcharts used for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
36
Match each option of the test command with a statement below.
a.-a
f.-n
b.!
g.-nt
c.-r
h.-s
d.-f
i.-e
e.-ne
true if a file exists and its size is greater than zero
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
37
You can define functions from the command line by first entering the name of the function and then completing the ____________________ to define it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
38
The -____________________-bashrc file sets default functions and aliases.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
39
To format record output you can use the translate utility,____.

A)tr
B)trns
C)trans
D)translate
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
40
A simple way to delete a record using ____ is with the -d (delete)option.

A)awk
B)sed
C)test
D)tr
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
41
What is a Boolean operator?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
42
The clear command is a useful housekeeping utility for clearing the screen,but you can use a faster method.Describe this alternative method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
43
How can you view the most recent command's exit status?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
44
What is a shell function?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
45
What is the test command used for?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
46
If you are using the Bash shell,what scripts are run automatically when you log in?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
47
How can you set defaults for using the vi editor?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
48
What does "input validation" mean?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 48 في هذه المجموعة.