On 04/29/2014 08:59 PM, Carlos E. R. wrote:
El 2014-04-29 a las 10:00 -0400, Anton Aylward escribió:
You can treat this a number of ways. One is to use "-print0" and quoting. Another is to use a non-zero value of the second token to tell you that there are spaces. However I prefer the first as it prefers file names with tabs and multiples spaces. You can also use "-printf". However a lot of the time I use "-print0" and pipe the output of find into "xargs -0".
I prefer instead to write intermediate steps on text files where I can examine them, and re-execute a secondary step directly from the intermediary file without running the first step.
I believe someone mentioned that the shell methods treat all whitespace, that is any string of space, tab, newline, as a single separator. So a file with the name "This\ is\ \t\ a\ \ \ long\nfile\ name" would be output with the "-print" in such a way that it is read into your WORD as either "This is a long file name" or "This is a long" depending on whether you piped or used an intermediate file. Thus when you tried accessing the file by the name in WORD it would fail. BTDT. That's why I use "-print0" and "xargs -0" Of course people coming from a MS-DOS (and a few other Oss come to that) world don't get to deal with long file names with embedded space :-) -- There are 10 kinds of people in the world, those that understand trinary, those that don't, and those that confuse it with binary. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org