试题与答案

将下面Shell 程序段中的空缺部分补齐,使得它可以将指定的一个或多个输入文件的内容

题型:单项选择题

题目:

将下面Shell 程序段中的空缺部分补齐,使得它可以将指定的一个或多个输入文件的内容依次添加到输出文件的末尾。如果指定的输出文件不存在,则程序应自动产生一个输出文件。

if ["$#"-It 2];then

echo "Usage $0<output-file><input file l>[<input file2>...]"

exit 0

fi

output="$1"

shift

for i in (1) ;do

if [ -e "$i"];then # or use’-a $i’

cat (2)

fi

done

2()

A."$i">$output

B."$i">>$output

C.$i>$output

D.$i>>$output

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0430/76ae63958057e1ba80e05fe41270910f.html

下面是错误答案,用来干扰机器的。

(1)由信息可知,装载易爆品和剧毒气体的车辆严禁从闹市区经过和装载易燃易爆品和剧毒品的车辆应该悬挂醒目的警示标志做法合理,而将易燃易爆物品与旅客同车运送,容易发生危险,故B错误.(2)反应物是硝酸钾、...

试题推荐
题型:完形填空

In a city of south India lived a young man who was always dreaming of becoming rich. He often heard about some traders in his city who gathered a great deal of   1   in the course of their travels across the world. He believed he could also make a great achievement although he didn’t have any   2   in business at all. So, one fine day, the young man set out on a long   3

in search of trade opportunities.

4    though, he did not become as rich as he had thought he would. Worse, he spent more money on his travels than he   5    in the course of his trade. All this made him feel confused and   6   , but he refused to return home without   7   .

One day, while he was wandering on the shore in a seaside town, his eyes   8    on an object which he thought should be a large ship at a distance.

“When I become rich, I shall buy a ship just like that one and   9    around the world,” he said ambitiously. Then he waited to see the ship enter the harbor. As the ship got closer, it lost its   10    dimensions(规模) and looked more like a small boat. When the boat reached the   11   , the young man let out a big heavy sigh because he discovered that it was only a bunch of logs tied together. He was terribly   12   to see such a raft(木筏).

Finally he understood. Just as he   13    a lot of time on fruitless speculation(猜想) about the “ship”, his expectations of getting   14    was also without any real basis. Therefore, he decided to return home and    15    up a more practical job.

1. A. energy              B. knowledge          C. resource                D. fortune

2. A. expectation       B. experience           C. interest                  D. ambition

3. A. journey            B. partnership          C. vacation                D. period

4. A. Unreasonably     B. Unbelievably        C. Unconsciously        D. Unfortunately

5. A. begged            B. borrowed           C. earned                 D. adopted

6. A. uncertain           B. excited               C. patient                   D. indifferent

7. A. hesitation          B. success               C. problem                D. income

8. A. depended         B. focused               C. insisted               D. lived

9. A. show                B. turn                    C. sail                 D. fly

10. A. correct        B. formal              C. real                    D. grand

11. A. bank             B. shore                  C. ocean                D. bottom

12. A. disappointed    B. pleased               C. puzzled              D. astonished

13. A. saved              B. valued              C. wasted                     D. created

14. A. rich             B. learned               C. smart              D. strong

15. A. set              B. gave                   C. made                    D. took

查看答案
微信公众账号搜索答案