Giventhefollowingscript,whydoestheoutputcomeoutasanemptylineinsteadofdog()!/bin/ksh$VAR=dogecho${VAR} A.The$VARvariablewasnotexported.B.The$VARshouldhavebeensetasVAR.C.dogneedsdoublequotesarounditwhensetting$VAR.D.The{}shouldnotbearoundVARintheechocommand.

Giventhefollowingscript,whydoestheoutputcomeoutasanemptylineinsteadof"dog"()!/bin/ksh$VAR=dogecho"${VAR}"

A.The$VARvariablewasnotexported.

B.The$VARshouldhavebeensetasVAR.

C.dogneedsdoublequotesarounditwhensetting$VAR.

D.The{}shouldnotbearoundVARintheechocommand.


相关考题:

在UNIX的树型目录结构中,常见用途的目录有:/bin、/dev、/home、/temp、/usr、/var等,其中用来存放大部分可执行的UNIX命令和共用程序的目录是:() A./binB./devC./homeD./usrE./tempF.var

Which directory does the Junos OS use to store syslog information by default?() A. /var/messagesB. /var/syslogC. /var/tmpD. /var/log

InwhichdirectoryarethebasicLinuxcommandssuchasgzip,gunzipandzcatinstalled?() A./opt/freeware/binB./usr/bin/freewareC./var/freeware/binD./usr/sbin/freeware

Which command will change the user webserver’s shell toksh93?() A.chshell -ksh93 webserverB.chsh webserver /usr/bin/ksh93C.chuser -a shell=/usr/bin/ksh93 webserverD.setuid -a SHELL=/usr/bin/ksh93 -u webserver

ASystempcustomerhasinstalledcomponentsfromtheLinuxToolBox.Bydefault,whichofthefollowingdirectorieswillcontaintheopensourcecommandssuchasgzip,gunzipandzcat() A./opt/freeware/binB./usr/bin/freewareC./var/freeware/binD./usr/sbin/freeware

ASystempadministratorsuspectstheyarereceivinganerrorfromoneoftheirnightlycronjobs.Thejobis:01***/usr/local/bin/nightlycheck.plWhereshouldtheadministratorfirstlookforerrorsreportedbythiscronjob() A./var/log/syslog.outB.var/log/cron.logC./var/spool/cron/logsD.mail

Whatisthemostlikelyproblemwiththisscript()VAR=1((VAR=$VAR+1))while[$VAR-It10]doecho$VARdone A.#!/bin/kshlineismissingB.VariablenameVARisnotproperlyinitializedC.LoopvariableisnotincrementedinsidetheloopD.Replacebracketswithbraces

Giventhefollowingscripts,whatoutputwouldbegenerated()usr/local/bin/scriptl!/usr/bin/kshVARl=redexportVARl=greenVARl=blue/usr/local/bin/script2ARl=yellow/usr/local/bin/script2!/bin/kshechoTheskyis${VAR1}.A.Theskyisred.B.Theskyisblue.C.Theskyisgreen.D.Theskyisyellow.

An operator needs to change from the /usr/bin to the /var/spool directory. Which of the following commands will accomplish this?() A. cd /var/spoolB. lcd /var/spoolC. cd /usr/bin /var/spoolD. lcd /usr/bin /var/spool