Professional Documents
Culture Documents
Midterm Exam: COS231a - F2022 Introduction To UNIX
Midterm Exam: COS231a - F2022 Introduction To UNIX
2022, 00:13
Midterm Exam
Due Oct 27 at 2:15pm Points 15 Questions 40
Available Oct 27 at 2:15pm - Nov 15 at 4:15pm Time Limit 90 Minutes
Attempt History
Attempt Time Score
LATEST Attempt 1 81 minutes 13.7 out of 15
You Answered
hidden files (starting with . (dot)
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 1 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
You Answered
wildcard. * for group of characters, ? for one
dot (.)
Compiled and interpreted files that can be run are called ____
program files.
binary
assembly
Correct! executable
dynamic
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 2 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Your Answer:
You Answered
byt
True
Correct!
False
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 3 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
What is ASCII?
Your Answer:
Correct! command
ex
edit
insert
You Answered
-s, serial
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 4 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Correct Answers -s
sout
Correct! stdout
standardout
stout
Correct! True
False
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 5 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
pattern
Correct!
awk
search
find
When you use the paste command, by default, the pasted results
appear in columns separated by commas.
True
Correct! False
Your Answer:
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 6 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
When you write a script, it is advisable to specify with what shell the
script is intended to be used. How can you do this?
Your Answer:
#/bin!/bash
-n
-c
-s
Correct! -y
You use the ____ command to search for a specified pattern in a file,
such as a particular word or phrase.
diff
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 7 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
find
Your Answer:
In some cases, when you use grep, it is helpful to enter the character
pattern you are trying to find in single or double quotes. Why?
Your Answer:
What is an algorithm?
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 8 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Your Answer:
____ 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.
Shell
Correct! Configuration
Global
Environment
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 9 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Evaluation
Comparison
Logical
Correct! Relational
Your Answer:
logic
debugging
Correct! syntax
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 10 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
compilation
You Answered
sequiational
sequential
Correct! control
decision
programming
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 11 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Correct!
operators
The Bash shell offers improved features over the older Bourne and
Korn shells and is fully backward compatible with the Bourne shell.
Correct! True
False
You should omit spaces when you assign a variable without using
single or double quotation marks around its value.
Correct! True
False
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 12 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
When you create a script, you should include the command that sets
the particular shell to use on ____.
Your Answer:
Ctrl+L
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 13 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Your Answer:
They are operators that are used for truth tables and in code. value
for it could be either true (1) or false (0)
How can you view the most recent command’s exit status?
Your Answer:
$! could be used
Your Answer:
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 14 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
the /usr
the /home
the root
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 15 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
Soup Menu
==========
(t)omato
(b)ean
(s)quash
(c)hicken
(l)amb
(m)ushrooms
=============
Select a soup . . . (q) to quit
With this script user should to place order in restaurant and generate
the list of order items saved in separate files, named
LastnameFirstname_Date_Time.order !
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 16 of 17
Midterm Exam: COS231a_F2022 Introduction to UNIX 28.11.2022, 00:13
#========================================
=======
Script Name: record_entry
By: TRJackson
#========================================
=======
looptrack = y
while [ "$ looptrack ""==11]
do
echo -n “Type in the account number:” rea
d account
echo -n “Type the first and last name:” ;
read full_name
echo -n “Type the age:” red age
echo -n “Enter another record?” ; read lo
optrack
finish
https://aubg.instructure.com/courses/3570/quizzes/4628 Page 17 of 17