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 14 pages
Exam (elaborations)

Dcom 142 Final Questions With Verified Answers

Document preview thumbnail
Preview 2 out of 14 pages

Which keystrokes invoke the pico or nano search function? - Answer F6 Ctrl-W Three keystrokes that can initiate a search-and-replace operation in nano are F14, , and . - Answer Ctrl+ Esc+R For which type of file is nano least likely to be useful for examining or editing? - Answer A LibreOffice word processing document While in vi's command mode, you can type to undo a change. - Answer u To save a file and exit the vi text editor in command mode, type - Answer ZZ If you have never used a text editor before, the nano text editor is usually the best one to learn first. - Answer True ASCII supports unique characters(not including control characters.) - Answer 128 GUI text editors for ASCII are superior to text-mode ASCII text editors because the GUI editors support underlining, italics, and multiple fonts. - Answer False Unicode is useful for encoding most European languages but not not Asian languages. - Answer False How would you remove two lines of text from a file when using vi? - Answer In command mode, position the cursor on the first line and type 2dd. What is the name of the software that we downloaded. - Answer Wingide How would you write a test that says "if /tmp/foo is a directory or USERS is greater than 5"? - Answer test -d /tmp/foo -o $USERS -gt 5 A conditional that lets you make multiple comparisons with a pattern is called: - Answer case A file begins with #!/bin/csh. This means: - Answer Running the script will invoke /bin/csh to interpret the rest of the file Most of nano's commands take the form of: - Answer Control and another character How would you finish your script with an exit code of 42? - Answer exit 42 Given the following script that is run through ./ hello goodbye: if [ -f $2 ]; then echo "I am here" fi When will "I am here" be printed? - Answer If a file called "goodbye" exists in the current directory The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in? - Answer test $USERS -eq 5 What does this shell script do? FOO=/tmp/foo if [ ! -d $FOO ]; then mkdir $FOO fi - Answer Creates /tmp/foo if it does not exist Which shell command accepts input from the user's keyboard? - Answer read The if command looks for what exit code to consider a condition to be true? - Answer 0 What is the correct way to assign the word "Hello" to a variable? - Answer . A="Hello" Which of the following are correct about for and while loops? (choose two - Answer while loops have a test each cycle to determine if it should run again for loops operate over a fixed list of items Given the following part of a script: if [ -f $1 ]; then echo "I am here" fi What is the meaning of $1? - Answer It is the first argument passed to the script What information is held inside $? ? - Answer The previous command's exit code What is the meaning of $(( $i + 1)) ? - Answer 1 will be added to the i variable What is the correct way to save the current directory to a variable? - Answer A=`pwd` The echo command: - Answer Is used to output text to the console Which are appropriate editors for writing shell scripts? (choose two) - Answer nano vi Given the following script: while [ ! -f /tmp/foo ]; do echo -n "."


Document information

Uploaded on
November 8, 2023
Number of pages
14
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$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.
Exampool
3.9
(32)
Sold
225
Followers
148
Items
3589
Last sold
1 month 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

Whoops! We can’t load your doc right now. Try again or contact support.