nerdexam
Linux_Foundation

LFCS · Question #117

What output will the command seq 10 produce?

The correct answer is B. The numbers 1 through 10 with one number per line. The seq command, when given a single positive integer, prints a sequence of numbers from 1 up to that integer, each on a new line.

Submitted by jakub_pl· Apr 18, 2026Essential Commands

Question

What output will the command seq 10 produce?

Options

  • AA continuous stream of numbers increasing in increments of 10 until stopped.
  • BThe numbers 1 through 10 with one number per line.
  • CThe numbers 0 through 9 with one number per line.
  • DThe number 10 to standard output.

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    92% (24)
  • D
    4% (1)

Why each option

The `seq` command, when given a single positive integer, prints a sequence of numbers from 1 up to that integer, each on a new line.

AA continuous stream of numbers increasing in increments of 10 until stopped.

`seq` produces a finite sequence defined by its arguments, not a continuous stream, and the default increment is 1, not 10.

BThe numbers 1 through 10 with one number per line.Correct

When `seq` is invoked with a single argument, it interprets it as the final value (last). By default, it starts from 1 and increments by 1, printing each number on a new line until the last value is reached. Thus, `seq 10` will output numbers 1, 2, 3, ..., 10, each on its own line.

CThe numbers 0 through 9 with one number per line.

`seq` starts counting from 1 by default when only an end value is provided, not 0.

DThe number 10 to standard output.

`seq 10` generates a sequence up to 10, not just the single number 10.

Concept tested: `seq` command usage

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

Topics

#seq command#Command-line utilities#Basic shell commands

Community Discussion

No community discussion yet for this question.

Full LFCS Practice