Control characters in file names
Posted Nov 25, 2010 16:23 UTC (Thu) by Spudd86 (guest, #51683)
(They are the sort of names that make correctly handling file names in a shell script end up taking hundreds of lines, which means nobody EVER does it, which means pretty much nobody has files with that kind of name, except that the breakage from those names can sometimes be a security hole)
Posted Dec 2, 2010 19:07 UTC (Thu) by Ross (guest, #4065)
In any case, someone gave some examples of how to handle whitespace (and anything else) properly in shell scripts below. Use of arrays and proper quoting or find0/xargs0 combinations aren't too complicated and work correctly. The problem is that if there is a mistake, it won't be obvious since it will work with most input.
Posted Dec 2, 2010 19:44 UTC (Thu) by cesarb (subscriber, #6266)
Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds