What is the output when the following shell script executes?

题目
单选题
What is the output when the following shell script executes?()   cat<;<;foobar   Hello foobar   foobar
A

 The contents of the file foobar.

B

 Hello

C

 No output but a file named foobar is created.

D

 Hello foobar

E

 Hello foobar foobar

参考答案和解析
正确答案: D
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which of the following is a good choice to use a process application monitor?()

  • A、 A process stated by cron
  • B、 A shell script owned by a non-root user
  • C、 A process with a specific name and owner
  • D、 An application defined to SRC without the restart (-O) flag

正确答案:C

第2题:

What is the output when the following shell script executes?()   cat<;<;foobar   Hello foobar   foobar

  • A、 The contents of the file foobar.
  • B、 Hello
  • C、 No output but a file named foobar is created.
  • D、 Hello foobar
  • E、 Hello foobar foobar

正确答案:D

第3题:

An operator needs to run a script which will write standard output and standard error to different files. Which of the following commands will successfully perform this task?()

A. myscript.ksh 1>/tmp/log/script.log 2>/tmp/log/script.err

B. myscript.ksh $1>/tmp/log/script.log $2>/tmp/log/script.err

C. myscript.ksh 1>/tmp/log/script.log 2>1 /tmp/log/script/err

D. myscript.ksh 2>1 /tmp/log/script.log 2> /tmp/log/script.err


参考答案:A

第4题:

Company.com has crated a process application monitor for an application that is initiated by a "c"  Shell script. The application monitor is not functioning as designed.  What could be the issue with eh application monitor?()  

  • A、 A process monitor cannot monitor an application started by a shell.
  • B、 For process monitors to function correctly, they must use the "korn" shell.
  • C、 A custom monitor cannot de3termine the status of applications started by shell scripts.
  • D、 The process monitor script is not existing with a zero return code after checking the status of the application.

正确答案:A

第5题:

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

第6题:

What will be written to the standard output when the following program is run?()  public class Qd803 {   public static void main(String args[]) {   String word = "restructure";   System.out.println(word.substring(2, 3));   }   }  

  • A、est
  • B、es
  • C、str
  • D、st
  • E、s

正确答案:E

第7题:

An operator needs to run a script which will write standard output and standard error to different files. Which of the following commands will successfully perform this task?()

  • A、myscript.ksh 1>/tmp/log/script.log 2>/tmp/log/script.err
  • B、myscript.ksh $1>/tmp/log/script.log $2>/tmp/log/script.err
  • C、myscript.ksh 1>/tmp/log/script.log 2>1 /tmp/log/script/err
  • D、myscript.ksh 2>1 /tmp/log/script.log 2> /tmp/log/script.err

正确答案:A

第8题:

What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }  

  • A、81
  • B、7
  • C、11
  • D、0
  • E、false

正确答案:C

第9题:

What can be done to enable the debug information for functions to be displayed when using‘ksh -x’to debug a script?()

  • A、Run the script using ‘ksh -fx’.
  • B、Run the script using ‘ksh -a function -x’.
  • C、Edit the script and add ‘set -x’ at the beginning.
  • D、Edit the script and add ‘set -x’ at the beginning of each function.

正确答案:D

第10题:

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

更多相关问题