单选题Given the following script, why does the output come out as an empty line instead of "dog"()#!/bin/ksh  $VAR=dog  echo "${VAR}"A The $VAR variable was not exported.B The $VAR should have been set as VAR.C dog needs double quotes around it when setting 

题目
单选题
Given the following script, why does the output come out as an empty line instead of "dog"()#!/bin/ksh  $VAR=dog  echo "${VAR}"
A

The $VAR variable was not exported.

B

The $VAR should have been set as VAR.

C

dog needs double quotes around it when setting $VAR.

D

The { } should not be around VAR in the echo command.


相似考题
更多“单选题Given the following script, why does the output come out as an empty line instead of "dog"()#!/bin/ksh  $VAR=dog  echo "${VAR}"A The $VAR variable was not exported.B The $VAR should have been set as VAR.C dog needs double quotes around it when setting ”相关问题
  • 第1题:

    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/spool

    B. lcd /var/spool

    C. cd /usr/bin /var/spool

    D. lcd /usr/bin /var/spool


    参考答案:A

  • 第2题:

    An administrator needs to document system changes that have occurred recently. The company has a policy of making all possible changes via the smit interface. Which file would show the commands that have been performed from within smit and their resulting output?()

    • A、/smit.log
    • B、/smit.script
    • C、/var/log/smit.log
    • D、/var/log/smit.script

    正确答案:A

  • 第3题:

    Given the following script, why does the output come out as an empty line instead of "dog"()#!/bin/ksh  $VAR=dog  echo "${VAR}"

    • A、The $VAR variable was not exported.
    • B、The $VAR should have been set as VAR.
    • C、dog needs double quotes around it when setting $VAR.
    • D、The { } should not be around VAR in the echo command.

    正确答案:B

  • 第4题:

    An Operator is in /var/tmp and needs to go to /var/adm. Which of the following is correct?()

    • A、cd /adm
    • B、cd ./adm
    • C、cd ../adm
    • D、cd /../adm

    正确答案:C

  • 第5题:

    To which directory does the Junos OS write traceoptions files?()

    • A、/var/tmp/
    • B、/var/
    • C、/var/log/
    • D、/var/home/<username>/

    正确答案:C

  • 第6题:

    Which of the following will permit an operator to retrieve console log output from the command line?()

    • A、lscons -l
    • B、cat /var/conslog
    • C、alog -t console -o
    • D、lslog /var/adm/conslog

    正确答案:C

  • 第7题:

    单选题
    Given the following script, why does the output come out as an empty line instead of "dog"?()
    A

    The $VAR variable was not exported

    B

    The $VAR should have been set as VAR

    C

    dog needs double quotes around it when setting $VAR

    D

    The { } should not be around VAR in the echo command


    正确答案: B
    解析: 暂无解析

  • 第8题:

    单选题
    A System p administrator needs to run the annualreval.sh script, directing standard error to /var/log/reval.err, and appending standard out to /var/log/reval.log.  How can this be accomplished ()
    A

    annualreval.sh 2>&1 /var/log/reval.log 2> /var/log/reval.err

    B

    annualreval.sh 1>/var/log/reval.log 2>/var/log/reval.err

    C

    annualreval.sh 2>>&1 /var/log/reval.log /var/log/reval.err

    D

    annualreval.sh 1>>/var/log/reval.log 2>/var/log/reval.err


    正确答案: B
    解析: 暂无解析

  • 第9题:

    单选题
    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/spool

    B

    lcd /var/spool

    C

    cd /usr/bin /var/spool

    D

    lcd /usr/bin /var/spool


    正确答案: B
    解析: 暂无解析

  • 第10题:

    单选题
    An Operator is in /var/tmp and needs to go to /var/adm. Which of the following is correct?()
    A

    cd /adm

    B

    cd ./adm

    C

    cd ../adm

    D

    cd /../adm


    正确答案: C
    解析: 暂无解析

  • 第11题:

    单选题
    Which directory does the Junos OS use to store syslog information by default?()
    A

    /var/messages

    B

    /var/syslog

    C

    /var/tmp

    D

    /var/log


    正确答案: D
    解析: 暂无解析

  • 第12题:

    单选题
    Which of the following will permit an operator to retrieve console log output from the command line?()
    A

    lscons -l

    B

    cat /var/conslog

    C

    alog -t console -o

    D

    lslog /var/adm/conslog


    正确答案: B
    解析: 暂无解析

  • 第13题:

    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/spool
    • B、lcd /var/spool
    • C、cd /usr/bin /var/spool
    • D、lcd /usr/bin /var/spool

    正确答案:A

  • 第14题:

    Given:  1. public class Method Over {  2. public void set Var (int a, int b, float c) {  3. }  4. }   Which two overload the set Var method()?

    • A、 private void set Var(int a, float c, int b) {}
    • B、 protected void set Var(int a, int b, float c) {}
    • C、 public int set Var(int a, float c, int b) {return a:}
    • D、 public int set Var(int a, int b, float c) {return a:}
    • E、 protected float set Var(int a, int b, float c) {return c:}

    正确答案:A,C

  • 第15题:

    What is the most likely problem with this script () VAR=1   ((VAR=$VAR+1))    while [ $VAR -It 10 ]    do   echo $VAR  done

    • A、#!/bin/ksh line is missing
    • B、Variable name VAR is not properly initialized
    • C、Loop variable is not incremented inside the loop
    • D、Replace brackets with braces

    正确答案:C

  • 第16题:

    Given the following scripts, what output would be generated() usr/local/bin/scriptl    #!/usr/bin/ksh    VARl=red    export VARl=green    VARl=blue    /usr/local/bin/script2    ARl=yellow   /usr/local/bin/script2     #!/bin/ksh   echo "The sky is ${VAR1}."

    • A、The sky is red.
    • B、The sky is blue.
    • C、The sky is green.
    • D、The sky is yellow.

    正确答案:C

  • 第17题:

    Which directory does the Junos OS use to store syslog information by default?()

    • A、/var/messages
    • B、/var/syslog
    • C、/var/tmp
    • D、/var/log

    正确答案:D

  • 第18题:

    A System p administrator needs to run the annualreval.sh script, directing standard error to /var/log/reval.err, and appending standard out to /var/log/reval.log.  How can this be accomplished ()

    • A、annualreval.sh 2>&1 /var/log/reval.log 2> /var/log/reval.err
    • B、annualreval.sh 1>/var/log/reval.log 2>/var/log/reval.err
    • C、annualreval.sh 2>>&1 /var/log/reval.log /var/log/reval.err
    • D、annualreval.sh 1>>/var/log/reval.log 2>/var/log/reval.err

    正确答案:D

  • 第19题:

    单选题
    Given the following script, why does the output come out as an empty line instead of "dog"()#!/bin/ksh  $VAR=dog  echo "${VAR}"
    A

    The $VAR variable was not exported.

    B

    The $VAR should have been set as VAR.

    C

    dog needs double quotes around it when setting $VAR.

    D

    The { } should not be around VAR in the echo command.


    正确答案: B
    解析: 暂无解析

  • 第20题:

    单选题
    Given the following scripts, what output would be generated() usr/local/bin/scriptl    #!/usr/bin/ksh    VARl=red    export VARl=green    VARl=blue    /usr/local/bin/script2    ARl=yellow   /usr/local/bin/script2     #!/bin/ksh   echo "The sky is ${VAR1}."
    A

    The sky is red.

    B

    The sky is blue.

    C

    The sky is green.

    D

    The sky is yellow.


    正确答案: B
    解析: 暂无解析

  • 第21题:

    单选题
    An administrator needs to document system changes that have occurred recently. The company has a policy of making all possible changes via the smit interface. Which file would show the commands that have been performed from within smit and their resulting output?()
    A

    /smit.log

    B

    /smit.script

    C

    /var/log/smit.log

    D

    /var/log/smit.script


    正确答案: A
    解析: 暂无解析

  • 第22题:

    单选题
    The author cites the dog as an example of artificial selection because of all the following statements EXCEPT that ______.
    A

    Dogs are domestic animals

    B

    The dog is one of nature’s survivors

    C

    Breeders register dogs to obtain a pedigree

    D

    Humans have been the primary agents in dog evolution


    正确答案: B
    解析:
    根据文章内容可知人工选择会栽培植物、驯化动物,并且第三段末句指出通过人工选择人们充当了agents of evolution。可见人们对狗进行人工选择时也符合这两方面内容,因此A、D项正确。C项内容在末段提及。由于狗是人工选择的结果,因此就不可能是自然选择的幸存者,故B项表述有误。

  • 第23题:

    单选题
    What is the most likely problem with this script () VAR=1   ((VAR=$VAR+1))    while [ $VAR -It 10 ]    do   echo $VAR  done
    A

    #!/bin/ksh line is missing

    B

    Variable name VAR is not properly initialized

    C

    Loop variable is not incremented inside the loop

    D

    Replace brackets with braces


    正确答案: C
    解析: 暂无解析

  • 第24题:

    单选题
    To which directory does the Junos OS write traceoptions files?()
    A

    /var/tmp/

    B

    /var/

    C

    /var/log/

    D

    /var/home/<username>/


    正确答案: A
    解析: 暂无解析