Post details: seq

10/29/06

Permalink 08:41:43 am, Categories: Linux, 44 words   English (US)

seq

I can't believe in all my syadmin I've never used 'seq'. Pretty cool for bash for loops:

m=`seq -f "host%02g" 1 20`
echo $m
host01 host02 host03 host04 host05 host06 host07 host08
host09 host10 host11 host12 host13 host14 host15 host16
host17 host18 host19 host20

Comments, Pingbacks:

Comment from: Randall hand [Visitor] · http://www.yeraze.com
Dude, that is AWESOME... i've been looking for a command to do just that for months, for use in a 'foreach' shell script...


Thanks dude!
Permalink 11/08/06 @ 12:29
Comment from: Barun Saha [Visitor] · http://sheshe-holo-shuru.blogspot.com
Hi Viraj,

This is really cool! I knew about 'seq', however, I never knew it could be used in this style. Like Randall, I too used 'for' loop to serve the purpose :(

Thanks,

Barun
Permalink 03/18/09 @ 06:39

Leave a comment:


Warning: touch() [function.touch]: Unable to create file /hsphere/local/home/valankar/viraj.org/_tmp/hn_captcha_counter.txt because No such file or directory in /hsphere/local/home/valankar/viraj.org/b2evolution/blogs/skins/hn_captcha.class.x1.php on line 209

Warning: touch() [function.touch]: Unable to create file /hsphere/local/home/valankar/viraj.org/_tmp/hn_captcha_counter.txt because No such file or directory in /hsphere/local/home/valankar/viraj.org/b2evolution/blogs/skins/hn_captcha.class.x1.php on line 209


An ERROR has occured!
Here you might send email-notification to webmaster or something like that.

Unable to safe captcha-image.