GNU/Linux Command – SEQ

seq — Prints a sequence of Nos to Stdout.

Summary :

`seq’ prints the numbers from Start to End in steps. By default, Start and Step are 1, and by default each number is separated by a new line. All numbers can be reals, not just integers.

Examples :
$ seq 6 -- Print Nos from 1 to 6. $ seq 2 6 -- Print Nos from 2 to 6. $ seq .1 .5 10 -- Real numbers with factional step value 0.1. $ seq 10 100 10000 -- Print Nos from 10 to 10K in step of 100. $ seq -w 10 100 10000 -- All Nos are printed equal width. $ seq -s' ' 1 2 10 -- Each number is separated by SPACE. $ seq -f %1.f 1000000 1000001 -- Print Nos with no exponent andno decimal point. $ seq -f %e 1 5 -- Print Nos with exponent and decimal point. $ seq 10 1 -- Print Nos from 10 to 1. $ seq 100 -5 1 -- Print Nos from 100 to 1 in steps of -5.

Note:

1) Fractional increment may NOT end with END value.
2) For more formatting detail is avail in info page.

Read : man seq

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: