The jot command has been around for ages, but remains one of those interesting commands that a lot of Linux users never get around to using. It can be very handy in scripts as well as on the command line by generating number or character sequences, even pseudo-randomly.

In its simplest form, the jot command generates a simple sequence of numbers from 1 to your selected maximum.

$ jot 5
1
2
3
4
5

You can stick the jot command output into simply by redirecting it.

$ jot 5 > five
$ cat five
1
2
3
4
5

If you want to start with some number other than 1, you just use a slightly different syntax. The command “jot 5 11”, for example, would create a list of five numbers starting with 11.

To read this article in full or to leave a comment, please click here