[dundee] Defcon-16 Media Archives

Rick Moynihan rick.moynihan at gmail.com
Thu Mar 12 16:01:10 UTC 2009


2009/3/12 Nicholas Walker <tel0seh at googlemail.com>:
> I'm thankful for the replies, I learnt a fair bit about efficiency, and the
> -i- wget trick.

To be clear, the rewritten version may or may not be more
'computationally/memory efficient' than your initial implementation.
It is however more efficient in expression, i.e. concise.

In scripts like this efficiency of code is unlikely to matter, as this
script should always be predominantly IO bound in terms of network
bandwidth.  i.e. if you want it to run quicker, buy a bigger pipe! :-)

Unless you have hard constraints, you're almost always better writing
programs for clarity/flexibility.  As for the wget -i - trick, any
unix command line tool worth its salt should allow IO redirection
through stdout/stdin etc...  When they're not the default for the
command it's just a matter of looking at the man page (or google) to
determine how to do it.

Incidentally for the programming langauge geeks amongst you (I'm
looking at you Barry! ;-) ) the revisions I offered were, like most
shell one-liners, a true functional program =)

R.



More information about the dundee mailing list