DCOM 142 FINAL EXAM QUESTIONS & ANSWERS SOLVED 100%
What is the default mode "vi" text editor, when "vi" editor is entered initially? - Answer command Which are two editors discussed in chapter 9 for writing shell scripts? (choose two) - Answer nano vi Which of the following are correct about for and while loops? (choose two) - Answer for loops operate over a fixed list of items while loops have a test each cycle to determine if it should run again Which of the following statements acts as a good replacement of the if-then-else-fi statement? - Answer case What is the purpose of conditional expressions in shell scripts? - Answer They enable the script to take different actions in response to variable data Given the following script that is run through .test .sh hello goodbye: if [ -f $2 ]; then echo "I am here" fi - Answer If a file called "goodbye" exists in the current directory What is the correct way to assign the word "Hello". to a variable? - Answer A="Hello" Which shell command accepts input from the user's keyboard? - Answer read Given the following part of a script: What is the meaning of $1? if [-f$1 ]; then echo "I am here" fi - Answer It is the first argument passed to the script What is the effect of the following short script, cp1 if its called as cp1 big.c ? - Answer It copies the contents of to big.c eliminating the old big.c Which of the following statements is included in a case statement to denote the end of a case statement? - Answer esac What key(s) will enable insert mode in "vi" editor? - Answer "i" key What key(s) will you use to delete a line in "vi" editor? - Answer "dd" After using a text editor to create a shell script, what step should you take before typing to use the script by typing its name? - Answer Set one or more executable bits using chmod Which of the following entries is maintained at the first line of the bash script? - Answer #!/bin/bash Which of the following extensions is used at the end of the script name? - Answer .sh What is the effect of the following short script, ex1, if its called as ex1 big.c ? #!/bin/bash cp $2 $1 - Answer It copies the contents of to big.c eliminating the old big.c Given the following script that is run through .test .sh hello goodbye: if [ -f $2 ]; then echo "I am here" fi - Answer If a file called "goodbye" exists in the current directory True or false: Valid looping statements in Bash include for, while and if-elseif-fi - Answer False True or false: A user types myscript to run a script called myscript. Within myscript, the $0 variable holds the value - Answer False Which of the following are valid CPU types for Intel-based platforms? (choose two) - Answer 32 BIT 64 BIT Which of the following commands will display CPU information? (choose two) - Answer arch lscpu Which of the following are common busing systems? (choose two) - Answer USB PCI A division of a hard drive may be referred to as a _______ . - Answer partition Which of the following options provides an interface between the hardware device and application software? - Answer device driver The Process ID (PID) of the init process is - Answer 1 The process "ps" command shows only processes running in the current shell by default. True or False? - Answer True Which of the following are package management commands for distributions with software distributed in files ending in .deb? (choose two) - Answer dpkg apt-get The following system load averages are displayed by the top command: (choose three) - Answer 1 5 15 When you execute the dmesg command, the system displays messages that are generated by the kernel. True or False? - Answer True
Written for
- Institution
- DCOM 142
- Course
- DCOM 142
Document information
- Uploaded on
- November 8, 2023
- Number of pages
- 13
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- dcom 142 stuvia
-
dcom 142 final exam questions answers solved 100
-
what is the default mode vi text editor when v
-
which are two editors discussed in chapter 9 for w