LWN.net Logo

Useless use of ...

Useless use of ...

Posted Jul 25, 2003 3:42 UTC (Fri) by bignose (subscriber, #40)
In reply to: Useless use of ... by sholden
Parent article: Graphics tricks from the Linux command line (IBM developerWorks)

> The article touches my pet hate of the week:
> for img in `ls *.jpg`

Hah. You think *you've* got pet hates. I look at the above and think "yech, they're still using backquotes when $() is POSIX-compliant and clearer".

I then have time left over to think "... and they're using .jpg instead of .jpeg as the file extension; the format is JPEG, not JPG, for crying out loud".

*Then* I get to the semantics of what they're doing and complain about needlessly spawning 'ls'. :-)


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds