nerdexam
Linux_Foundation

LFCS · Question #279

Which of the following outputs will the below command produce? seq 1 5 20

The correct answer is A. 1. The seq 1 5 20 command generates a sequence of numbers starting at 1, incrementing by 5, and stopping before exceeding 20.

Submitted by satoshi_tk· Apr 18, 2026Essential Commands

Question

Which of the following outputs will the below command produce? seq 1 5 20

Options

  • A1
  • B1
  • C1
  • D2
  • E5

How the community answered

(47 responses)
  • A
    70% (33)
  • B
    9% (4)
  • C
    4% (2)
  • D
    2% (1)
  • E
    15% (7)

Why each option

The `seq 1 5 20` command generates a sequence of numbers starting at 1, incrementing by 5, and stopping before exceeding 20.

A1Correct

The `seq FIRST INCREMENT LAST` command generates numbers starting from `FIRST` (1), incrementing by `INCREMENT` (5), up to `LAST` (20). The first number in this sequence is 1.

B1

The output includes more numbers than just '1', but '1' is the correct starting point.

C1

The output includes more numbers than just '1', but '1' is the correct starting point.

D2

The number 2 is not generated by this command; the sequence starts at 1 and increments by 5.

E5

The number 5 is not generated by this command; the sequence starts at 1 and increments by 5.

Concept tested: seq command usage

Source: https://man7.org/linux/man-pages/man1/seq.1.html

Topics

#seq command#sequence generation#shell utilities#command line basics

Community Discussion

No community discussion yet for this question.

Full LFCS Practice