Difference between revisions of "User talk:Lcarsos"
(→Multi-file Generation?: Interim response) |
Blaisepascal (talk | contribs) (→Multi-file Generation?: Clarification of shell syntax.) |
||
Line 8: | Line 8: | ||
I assume that <tt>./importer.rb 100{0,1,2,3,4,5,6,7,8,9}</tt> would also work? [[User:Blaisepascal|Blaisepascal]] ([[User talk:Blaisepascal|talk]]) 02:08, 26 August 2012 (UTC) | I assume that <tt>./importer.rb 100{0,1,2,3,4,5,6,7,8,9}</tt> would also work? [[User:Blaisepascal|Blaisepascal]] ([[User talk:Blaisepascal|talk]]) 02:08, 26 August 2012 (UTC) | ||
: I hadn't even thought of that. I'll try it and report back as soon as I get home after work. [[User:Lcarsos|lcarsos]] ([[User talk:Lcarsos|talk]]) 16:18, 27 August 2012 (UTC) | : I hadn't even thought of that. I'll try it and report back as soon as I get home after work. [[User:Lcarsos|lcarsos]] ([[User talk:Lcarsos|talk]]) 16:18, 27 August 2012 (UTC) | ||
+ | :: It'll work; it's not a Ruby thing, it's a Borne Shell thing. When the Borne Shell does wild-card expansion, it generates all alternatives enclosed in braces. So "echo 1{2,3,4,5}" is equivalent to "echo 12 13 14 15". I've been known to do things like <tt>echo 1 2 3 4 5 6 7 8 9 {1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9} 100</tt> to list all numbers between 1 and 100. [[User:Blaisepascal|Blaisepascal]] ([[User talk:Blaisepascal|talk]]) 16:34, 27 August 2012 (UTC) |
Revision as of 16:34, 27 August 2012
Moved discussion
Hi, just to let you know that I move the thread you started to explain xkcd:Community portal/Admin requests. Cheers, --Waldir (talk) 10:33, 10 August 2012 (UTC)
Ruby Importer
For discussion of the Ruby Import assistant. Please create subsections for each item.
Multi-file Generation?
I assume that ./importer.rb 100{0,1,2,3,4,5,6,7,8,9} would also work? Blaisepascal (talk) 02:08, 26 August 2012 (UTC)
- I hadn't even thought of that. I'll try it and report back as soon as I get home after work. lcarsos (talk) 16:18, 27 August 2012 (UTC)
- It'll work; it's not a Ruby thing, it's a Borne Shell thing. When the Borne Shell does wild-card expansion, it generates all alternatives enclosed in braces. So "echo 1{2,3,4,5}" is equivalent to "echo 12 13 14 15". I've been known to do things like echo 1 2 3 4 5 6 7 8 9 {1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9} 100 to list all numbers between 1 and 100. Blaisepascal (talk) 16:34, 27 August 2012 (UTC)