Invert Pro

Selamat Datang...

Haiii haiiii Admin kembali lagi.

MULAIJOIN THIS SITE

Thursday, October 22, 2015

NDG LINUX CHAPTER 9

NDG Linux Essentials - CISCO Networking Academy - Questions and Answers 



CORRECT - See section 9.4
Which are appropriate editors for writing shell scripts?
  • nano
  • vi

CORRECT - See section 9.4
Most of nanos commands take the form of:
  • Control and another character

CORRECT - See section 9.5.2
What does this shell script do?
FOO=/tmp/foo
if [ ! d $FOO ]; then
    mkdir $FOO
fi
  • Creates /tmp/foo if it does not exist

CORRECT - See section 9.5.1
Given the following part of a script:
if [ -f $1 ]; then
    echo I am here
fi
What is the meaning of $1?
  • It is the first argument passed to the script

CORRECT - See section 9.5.1
What is the correct way to save the current directory to a variable?
  • A=`pwd`

CORRECT - See section 9.5.1
Which shell command accepts input from the users keyboard?
  • read

CORRECT - See section 9.5.1
What information is held inside $? ?
  • The previous commands exit code

CORRECT - See section 9.5.1
How would you finish your script with an exit code of 42?
  • exit 42

CORRECT - See section 9.5.2
The if command looks for what exit code to consider a condition to be true?
  • 0

CORRECT - See section 9.5.2
A conditional that lets you make multiple comparisons with a pattern is called:
  • case
Load disqus comments

0 komentar