Professional Documents
Culture Documents
(Download PDF) Guide To UNIX Using Linux 4th Edition Palmer Test Bank Full Chapter
(Download PDF) Guide To UNIX Using Linux 4th Edition Palmer Test Bank Full Chapter
https://testbankfan.com/product/guide-to-unix-using-linux-4th-
edition-palmer-solutions-manual/
https://testbankfan.com/product/comptia-linux-guide-to-linux-
certification-4th-edition-eckert-test-bank/
https://testbankfan.com/product/comptia-linux-guide-to-linux-
certification-4th-edition-eckert-solutions-manual/
https://testbankfan.com/product/your-unix-linux-the-ultimate-
guide-3rd-edition-sumitabha-das-solutions-manual/
Guide to Operating Systems 4th Edition Palmer Test Bank
https://testbankfan.com/product/guide-to-operating-systems-4th-
edition-palmer-test-bank/
https://testbankfan.com/product/mcitp-guide-to-microsoftr-
windows-server-2008-1st-edition-palmer-test-bank/
https://testbankfan.com/product/practical-guide-to-fedora-and-
red-hat-enterprise-linux-a-7th-edition-sobell-solutions-manual/
https://testbankfan.com/product/guide-to-wireless-
communications-4th-edition-olenewa-test-bank/
https://testbankfan.com/product/guide-to-tcp-ip-4th-edition-
carrell-test-bank/
CHAPTER 7: ADVANCED SHELL PROGRAMMING
TRUE/FALSE
1. The program development cycle begins with creating specifications for a program.
2. After creating a flowchart, the next step in designing a program is to write the program code.
4. In UNIX/Linux, all shells support the same commands and programming statements.
5. A .bash_logout file in each Bash user’s home directory executes commands when the user logs out.
MULTIPLE CHOICE
2. 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 c. block chart
b. map d. pseudocode
ANS: A REF: 340
8. When you create a script, you should include the command that sets the particular shell to use on ____.
a. the configuration file c. the first line of the script
b. your login script d. the last line of the script
ANS: C REF: 344
9. The line in the script for setting the Bash shell is: ____.
a. #!/bin/bash c. #/bin/bash
b. !#/bin/bash d. !/bin/bash
ANS: A REF: 344
10. For your own account, the shell that is set up by default is established by the system administrator in
the ____ file.
a. /etc/shell c. /etc/shadow
b. /etc/passwd d. /etc/default
ANS: B REF: 345
11. Each record in the /etc/passwd file is simply a record with variable-length fields separated by ____.
a. dashes (-) c. semicolons (;)
b. commas (,) d. colons (:)
ANS: D REF: 345
12. ____ is a multifunction tool that enables you to manage openSUSE from one location.
a. User Manager c. Control Panel
b. YaST d. MC
ANS: B REF: 345
14. To view a list of the files in a directory, including the hidden files, you should enter ____.
a. ls -l c. ls -h
b. ls -r d. ls -a
ANS: D REF: 346
15. The ____ file is run each time you log in or give the command to set Bash as your current shell, but
not when you run a subshell.
a. .bash_profile c. .bashrc
b. .bash d. .bash_login
ANS: A REF: 347
16. The ____ file typically contains settings, such as environment variable settings, aliases, and other
settings that you always want in effect when you are in the Bash shell.
a. .bash_profile c. .bashrc
b. .bash d. .bash_login
ANS: A REF: 347
17. The ____ file runs when you log in using the Bash shell as the default, and each time you start a Bash
shell within a Bash shell.
a. .bash_profile c. .bashrc
b. .bash d. .bash_login
ANS: C REF: 347
18. The ____ operator of the test command, combines two expressions and tests a logical OR relationship
between them.
a. | c. -O
b. || d. -o
ANS: D REF: 353
19. To format record output you can use the translate utility, ____.
a. tr c. trans
b. trns d. translate
ANS: A REF: 353
20. A simple way to delete a record using ____ is with the -d (delete) option.
a. awk c. test
b. sed d. tr
ANS: B REF: 354
21. A function name differs from a variable name because a function name is followed by a set of ____.
a. parentheses c. square brackets
b. curly brackets d. angle brackets
ANS: A REF: 360
COMPLETION
1. ____________________ enable you to determine the type of data needed for input, the processes that
must be performed, and the output requirements.
ANS: Specifications
REF: 340
2. Two popular and proven analysis tools are used to help you design your programs to meet the program
specifications: the flowchart and ____________________.
ANS: pseudocode
REF: 340
3. The ____________________ that connect the symbols in a flowchart represent the direction in which
the program flows.
ANS: arrows
REF: 341
ANS: Pseudocode
REF: 343
ANS: etc
REF: 348
6. You can define functions from the command line by first entering the name of the function and then
completing the ____________________ to define it.
ANS: parameters
REF: 360
MATCHING
SHORT ANSWER
ANS:
Organizations use flowcharts to design and document all kinds of processes and procedures.
Programmers also use flowcharts to map and understand a program’s sequence and each action the
program takes. For the programmer the flowchart provides a map through the design process to show
what programs and logic must be created. It provides a way of linking what is wanted in the
specifications to the program code that is to be written.
REF: 340
ANS:
Pseudocode instructions are used to create a model that you can later use as a basis for a real program.
REF: 343
3. If you are using the Bash shell, what scripts are run automatically when you log in?
ANS:
With Bash set as your shell, two scripts run automatically when you log in: .bash_profile and .bashrc.
REF: 346
ANS:
If you like using the vi editor, you have the option of configuring a file called .exrc in your home
directory. .exrc can be used to automatically set up your vi environment.
REF: 348
ANS:
The test command is used to analyze an expression to determine if it is true—often used in shell scripts
to verify an environmental condition, such as the existence of a file.
REF: 349
6. How can you view the most recent command’s exit status?
ANS:
You can view the most recent command’s exit status by typing the command: echo $?.
REF: 350
ANS:
A Boolean operator is a logical operator that symbolizes AND, OR, or NOT to evaluate a relationship,
such as a comparison of two expressions—and the result of the evaluation is either true or false.
REF: 352
8. The clear command is a useful housekeeping utility for clearing the screen, but you can use a faster
method. Describe this alternative method.
ANS:
You can store the output of the clear command in a shell variable. The output of the clear command is
a sequence of values that erases the contents of the screen. Storing these values in a variable and then
echoing the contents of the variable on the screen accomplishes the same thing, but about 10 times
faster.
REF: 355
ANS:
Because users do not always enter valid data, a program should always check its input to ensure the
user has entered acceptable information. This is known as input validation.
REF: 358
ANS:
A shell function is a group of commands that is stored in memory and assigned a name. Shell scripts
can use the function name to execute the commands.
REF: 359
Another random document with
no related content on Scribd:
pilkkumiin, pannen sekaan muutama lusikallinen kirsimarja-hilloa.
Tämä on nyt valmista pöytään tuotaa, joko lämpösenä taikka
kylmänä. Tällä lailla sopii tehdä kasta monista muistakin marjoista,
niinkuin marjan-liemistäkin.
9:säs Jako.
MAKKAROITA.
10:nes Jako.
PASTEIJOJA, TORTTUJA,
PAAKKELSEJA, PANNUKAKKOJA JA
KRÄÄMEJÄ.
B) TORTTUJA.
D) PANNUKAKKOJA.