Not logged in
Log in now
Create an account
Subscribe to LWN
Pencil, Pencil, and Pencil
Dividing the Linux desktop
LWN.net Weekly Edition for June 13, 2013
A report from pgCon 2013
Little things that matter in language design
Control characters in file names
Posted Nov 25, 2010 21:48 UTC (Thu) by jengelh (subscriber, #33263)
Posted Nov 25, 2010 22:00 UTC (Thu) by Spudd86 (guest, #51683)
see here: http://www.dwheeler.com/essays/filenames-in-shell.html and here: http://www.dwheeler.com/essays/fixing-unix-linux-filename... although for some reason I remember it being much worse than that, though being correct everywhere in your script could eventually be a pain.
Posted Dec 2, 2010 19:19 UTC (Thu) by Ross (subscriber, #4065)
Posted Nov 25, 2010 23:30 UTC (Thu) by cmccabe (guest, #60281)
The for loop should be
for i in *; do cmd "./$i"; done;
In case one of the filenames begins with a dash.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds