Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

NOS 120 STUDY CHAPTER 7 EXAM QUESTIONS AND ANSWERS

Document preview thumbnail
Preview 2 out of 8 pages

NOS 120 STUDY CHAPTER 7 EXAM QUESTIONS AND ANSWERS...

Content preview

NOS 120 STUDY CHAPTER 7 EXAM
QUESTION AND ANSWERS

When writing shell scripts and using an if statement to determine
whether a set of code should be executed, what is the proper syntax to
end the if construct? Answer: ________________________________ -
ANSWER fi

The subdirectory newdir does not currently exist in the current directory
that you are in. Which of the following commands will create a new
directory named newdir and then change into that directory? (Choose
two.)
Select one or more:
a. mkdir newdir; cd newdir
b. mkdir newdir || cd newdir
c. mkdir newdir >> cd newdir
d. mkdir newdir && cd newdir - ANSWER mkdir newdir && cd newdir
mkdir newdir; cd newdir

How many times will the following loop execute as part of a script:

#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 7 ]
do
echo "hello world"
done
Select one:
a. 7
b. 0
c. 1
d. until ctrl-c is used to terminate it - ANSWER until ctrl-c is used to
terminate it

Which of the following will the split command do on a file when no other
options are specified?

, Select one:
a. It will split a file into new files that are 1 kilobyte each.
b. It will split a file into new equally sized files that are 1/10th of the
original file size.
c. It will split a file into new files that are 1 megabyte each.
d. It will split a file into new files that are 1,000 lines each. - ANSWER It
will split a file into new equally sized files that are 1/10th of the original
file size.

Match the file with the order in which the BASH shell environment files
are read:
/etc/profile, /etc/bashrc, ~/.bashrc, /etc/profile.d/* - ANSWER Second
/etc/profile.d/*
Fourth
~/.bashrc
Third
/etc/bashrc
First
/etc/profile

Which of the following is a valid method of running a script named
myscript.sh? (Choose two)
Select one or more:
a. source myscript.sh
b. run myscript.sh
c. ./myscript.sh
d. exec ./myscript.sh - ANSWER ./myscript.sh
source myscript.sh

Which of the following would be the results of running the command seq
7?
Select one:
a. 6 through 0 being displayed one number per line.
b. 7 through 1 being displayed one number per line.
c. 0 through 6 being displayed one number per line.
d. 1 through 7 being displayed one number per line. - ANSWER 1
through 7 being displayed one number per line.

Document information

Uploaded on
October 17, 2024
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown
$11.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
luzlinkuz
3.8
(328)
Sold
1594
Followers
852
Items
32231
Last sold
3 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions