David Leverton wrote: > On Wednesday 15 October 2008 10:33:22 Steve Long wrote: >> Here you go (this is on an old machine, so you'll get much quicker times >> if you try this at home): >> [EMAIL PROTECTED] ~]$ echo "$(<run)" >> #!/bin/bash >> P='some-crap/god-i-hate-asshats' > > I do hope that that isn't directed at anyone in particular. > No, but thanks for drawing attention to it. >> for ((i=0;i<100000;i++)); do echo /usr/share/doc/${P}/examples > >> /dev/null; > >> real 11.25 > >> real 9.24 > > So that's what, on the order of 20 microseconds faster for each iteration? > Or ~18%. (You shouldn't use the first iteration in general, btw.) > This is a purely stylistic issue, same as the braces with variable > expansions. See my other posts.
> You're free to write your own code however you like, but > harassing other people to do things your favourite way with no practical > benefit is just going to annoy everyone. I'm sorry you feel harrassed by my talking about the basics of shell-scripting, it wasn't intended like that. Though, given your tone, I don't think you are feeling harrassed; perhaps you're just feeling defensive about your trap boo-boo? Whatever, leaving aside the amateur dramatics, it was more to show how to do the benchmarking than anything else; I'd have simply said "yes" but that reminded me too much of behaviour I have criticised in the past. For the record, I'm sorry if my choice of package name caused any offence to anyone else. It was a quick thing I knocked off, cp'ed and pasted; at most I thought it would be taken as a joke when I wrote it, then I didn't check it through in the correct frame of mind (I have flu and was tired, so just wanted to send the thing and didn't check the script itself) when I sent it, and for that I apologise to everyone reading.