Generating numeric sequences with the Linux seq command

Generating numeric sequences with the Linux seq command

One of the easiest ways to generate a list of numbers in Linux is to use the seq (sequence) command. In its simplest form, seq will take a single number and then list all the numbers from 1 to that number. For example:

$ seq 5
1
2
3
4
5

Unless directed otherwise, seq always starts with 1. You can start a sequence with a different number by inserting it before the final number.

$ seq 3 5
3
4
5

Specifying an increment

You can also specify an increment. Say you want to list multiples of 3. Specify your starting point (first 3 in this example), increment (second 3) and end point (18).

To read this article in full, please click here

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://safevoip.co.uk/wp-content/uploads/2017/04/slider.jpg);background-size: initial;background-position: top center;background-attachment: initial;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 650px;}