bash increment in a given way

S Mathias smathias1972 at yahoo.com
Sat Dec 11 16:53:45 UTC 2010


thank you, but already solved!

$ for i in $(seq 0 4 16); do seq $i 1 $(( $i + 1 )); done
0
1
4
5
8
9
12
13
16
17


--- On Sat, 12/11/10, John Haxby <john.haxby at gmail.com> wrote:

From: John Haxby <john.haxby at gmail.com>
Subject: Re: bash increment in a given way
To: "Community support for Fedora users" <users at lists.fedoraproject.org>
Date: Saturday, December 11, 2010, 4:50 PM



On 11 December 2010 14:34, S Mathias <smathias1972 at yahoo.com> wrote:


but what's the "magic" for this? :

$ MAGIC; do echo "Welcome $i times"; done
Welcome 0 times

Welcome 1 times
Welcome 4 times
Welcome 5 times
Welcome 8 times
Welcome 9 times
$



for i in 0 1 4 5 8 9; do ....
 

-----Inline Attachment Follows-----

-- 
users mailing list
users at lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20101211/f912f858/attachment.html 


More information about the users mailing list