What output will the following command produce? seq 1 5 20
A. 1 61116
B. 1 5 10 15
C. 1 234
D. 2 345
E. 5 10 15 20
2 Comments on “What output will the following command produce?”
Zsays:
A should be
1
6
11
16
seq 1 5 20 means the sequence starts from 1 and increases by 5 and smaller than 20. So the answer is A.
5
0
zzsays:
Correct.
man seq
seq options FIRST INCREMENT LAST
FIRST number. Start with 1
INCREMENT number. Increment 5 to the FIRST number and nexts.
LAST number. Increment until the LAST number 20, then the last number will be 16.
A should be
1
6
11
16
seq 1 5 20 means the sequence starts from 1 and increases by 5 and smaller than 20. So the answer is A.
5
0
Correct.
man seq
seq options FIRST INCREMENT LAST
FIRST number. Start with 1
INCREMENT number. Increment 5 to the FIRST number and nexts.
LAST number. Increment until the LAST number 20, then the last number will be 16.
Bye
1
0