Shell Scripting: Generate or Print Range of Numbers ( Sequence of Numbers for Loop )

Posted on in Categories FreeBSD, Gentoo Linux, Howto, Linux, php, programming, Shell scripting, Tips, Troubleshooting, Ubuntu Linux, UNIX last updated September 26, 2006

One our reader asks:

How do I generate a range of numbers under BASH for loop command? For example, I need to run particular command inside loop 100 or 500 times. Basically I want function that counts FROM and TO a range of numbers like 50-10.