题目内容

Your shell script needs to test to see if a directory, document, exists; a way to do this is:

A. [ -h document ]
B. [ document –gt 0 ]
C. [ -d document ]
D. [ -s document ]

查看答案
更多问题

Your shell script uses an "if" statement to see if the word "yes" was entered. This "if" statement looks like:

A. if ( $RESPONSE = "yes" ) ; then
B. if [ RESPONSE = "yes" ) ; then
C. if [ $RESPONSE == "yes" ] ; then
D. if ( RESPONSE = "yes" ) ; then

Why should we use shell scripts?

A. They combine long, possibly repetitive commands into one simple command
B. They allow you to create new commands and share these procedures among several users
C. They automate tasks and reduce risk of errors
D. All of the above

Which of following could you use to check the status of all your printers?

A. status –a
B. lp status –all
C. lprm my-printers
D. lpstat –a

The command wc –l some_file will print out the number of:

A. lines in some_file
B. words in some_file
C. characters in some_file
D. bytes in some_file

答案查题题库