Re: bash increment in a given way

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux