[CentOS] bash increment in a given way

Athmane Madjoudj athmanem at gmail.com
Sat Dec 11 15:03:13 UTC 2010


On 12/11/2010 03:41 PM, Stephen Harris wrote:
> On Sat, Dec 11, 2010 at 06:34:25AM -0800, S Mathias wrote:
> You might just have to hard-code the sequence:
>
>    for i in 0 1 4 5 8 9; do ....
>

You can use seq (see: man seq)

for i in `seq FIRST INCREMENT LAST` ; do
	echo $i
done;

-- 
Athmane Madjoudj



More information about the CentOS mailing list