用看的、听的学真题

study by eyes and ears.

  1. 首页
  2. 系统分析师
  3. 2005年05月系统分析师考试上午真题【基础知识】
  4. 真题详解

2005年05月系统分析师考试上午真题【基础知识】(第41-42题) 收藏

【41-42】将下面Shell程序段中的空缺部分补齐,使得它可以将指定的一个或多个输入文件的内容依次添加到输出文件的末尾,如果指定的输出文件不存在,则程序应自动产生一个输出文件
if [“$#”-lt 2 ];then
  echo “usage $0 <output-file> <input file 1> [<input file2>…]”
   exit 0
 fi
 output=“$1”
 shift
 for I in (41);do
  if [-e“$i”];then # or use‘-a $i’
   cat(42)
  fi
 done

【41】选项 (1.0分)

  • A$#
  • B$i
  • C$!
  • D$@

【42】选项 (1.0分)

  • A"$i" > $output
  • B"$i" >> $output
  • C$i > $output
  • D$i >> $output
广告位