Issa Alkhawaja4

.pdf

School

Northern Virginia Community College *

*We aren’t endorsed by this school

Course

171

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

4

Uploaded by JusticeCloverYak38

Report
Issa Alkhawaja 1. You have been asked to write a script for use by the faculty at the engineering school at your college.The script you write uses the Bash shell, but some faculty members often use a different shell in their work. How can you best ensure that the Bash shell is invoked when this script is run? a. Enter the line # !/ bin/bash as the first line in the script. 2. Which of the following script statements accomplishes the same thing as thestatement: while [ "$part" != "alternator" ] ; do ? (Choose all that apply.) b. while test $part != "alternator" ; do 3. Your shell script, called .filetests, contains several functions used to run tests on files, such as to determine if a file is empty or has the correct permissions.Which of the following is/are true about .filetests? (Choose all that apply.) a. You can load the file’s functions into memory by entering . .filetests . 4. When you enter echo $CLR your screen clears very quickly.Which of the following commands must you have entered previously to enable use of echo $CLR to clear the screen? d. CLR= clear 5. Your company has assigned you to revise 22 scripts. Since you use the vi editor, how can you set it to automatically display lines as numbered so it is easier for you to work on these revisions? b. Create the .exrc file in your home directory so this file contains the line: set number . 6. You use the same five shell functions every day and are looking for a way to ensure they are available as soon as you log into your account.What can you do? c. Load them via your login script.
7. When you enter test -d tmp ; echo $? , you see a 0 displayed on the screen.What does this mean? c. The tmp directory exists. 8. What does a down arrow represent in a flowchart? a. process flow 9. Which of the following are examples of Boolean operators used with the test command? (Choose all that apply.) a. -a for a logical AND d. -o for a logical OR 10. You have a specialized data file, called customers, in which the fields in the file are separated by the character ^.You want to view this file with a colon between the fields before you convert it to remove the ^ characters and insert colons.Which of the following commands enables you to view the file in this way? c. cat customers | tr "^" ":" 11. Which of the following statements enables you to determine if the variable, called value, is less than 750? c. test $value - lt 750 12. Some Linux systems use the each time a user logs out of her account. a. .bash_logout 13. You have recently met with your company’s budget committee about creating a script to for producing the same budget reports at the end of each month. Because this is an important undertaking you’ve started by creating a flowchart.What step should you take next?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help