What output will the following command produce?
What output will the following command produce?
seq 1 5 20
A . 1
6
1
1
1
6
B . 1
5
10
15
C . 1
2
3
4
D . 2
3
4
5
E . 5
10
15
20
Answer: B
Explanation:
The seq command in Linux is used to generate a sequence of numbers from FIRST to LAST in steps of
INCREMENT1. The syntax for the seq command is:
seq [OPTION]… LAST or seq [OPTION]… FIRST LAST or seq [OPTION]… FIRST INCREMENT LAST
In this case, the command seq 1 5 20 has three arguments: FIRST = 1, INCREMENT = 5, and LAST = 20.
This means that the command will produce numbers from 1 to 20 in steps of 5. The output will be:
151015
The output will not include 20 because it is not a multiple of 5. The output will be printed on separate lines by default, unless a different separator is specified with the -s option2.
Reference: Seq Command in Linux [Explained With Examples]
seq Man Page – Linux – SS64.com – SS64 Command line reference
Latest 102-500 Dumps Valid Version with 194 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund