-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
MJ Ray mjr@phonecoop.coop wrote:
Brett Parker iDunno@sommitrealweird.co.uk wrote:
Hmm, useful. Sortof. Though, other than you, dear Mark, who else is running the rc shell? I'd make an assumption that most people are using bash, or some derivitive of sh. [...]
In bash, you could do "cp $(seq -fdcp_11%g.jpg 58 83) dest" for the same effect, but it's not as general.
[...] which causes problems in this and other situations, instead of doing what you usually want.
Well, no, it wouldn't because I'm very very used to how bash expands things ;)
So why did you use for and xargs to bring that into the problem? ;-)
For and xargs was the second example, and not as neat as the first, the first using pure shell globbing foo, the second being an easy ish way to do it if you don't know globbing.
Oh, and of course, I used xargs foo to reduce the number of processes required on a large data set :P The for and xargs foo maybe required on stupidly large data sets.
Anyway, the point was that Dave was expecting the obvious thing and bash doesn't do the obvious thing: a bug in bash not Dave.
I'd say it's non-obvious to a shell that you want that bit in the middle of these things to be {pre,app}ended to the data. Maybe I'm not really human though :P
Cheers, - -- Brett Parker web: http://www.sommitrealweird.co.uk/ email: iDunno@sommitrealweird.co.uk