⚠️ Warning: This is a draft ⚠️

This means it might contain formatting issues, incorrect code, conceptual problems, or other severe issues.

If you want to help to improve and eventually enable this page, please fork RosettaGit's repository and open a merge request on GitHub.

{{library}} jot(1) is a shell command from [[BSD]] that can print a list of numbers. jot(1) is convenient when a [[UNIX Shell]] program needs to iterate a range of numbers. Examples that use jot(1) will not work with other Unix systems that are missing jot(1).

# Example: this loop echoes Got 1, Got 2, Got 3.
for i in `jot 3`; do
	echo Got $i
done

The syntax is jot count begin end step

All four arguments are optional. A hyphen - skips an argument. Here are some examples.

  • jot 5 prints 1 2 3 4 5.
  • jot 5 10 20 prints 10 12 15 18 20.
  • jot -p 2 5 10 20 prints 10.00 12.50 15.00 17.50 20.00.
  • jot - 3 7 1 prints 3 4 5 6 7.
  • jot - 7 3 -1 prints 7 6 5 4 3.

It has a few other features, like random numbers. For a manual page, see [http://www.openbsd.org/cgi-bin/man.cgi?query=jot&apropos=0&sektion=1&manpath=OpenBSD+Current&arch=i386&format=html jot(1)].