3 ms·
If filenames can contain LF characters, 'find | grep foo' is also wrong. (Interesting idea with print0, but I fear this is mere symptomatic relief, rather than
by billpg 15y ago
If filenames can contain LF characters, 'find | grep foo' is also wrong.
(Interesting idea with print0, but I fear this is mere symptomatic relief, rather than actually fixing the problem.)
- barrkel 15y agoAs I already said, newlines[1] are vanishingly rare in filenames (most file manager UIs treat attempts at introducing a newline into the name as as committing the file rename), so I find it useful, so I wrote the utility, which only I use. How you figure my solution to my problem is only symptomatic treatment, with technical drawbacks I already mentioned but treat as acceptable, is beyond me. [1] As I mention in a cousin comment to this one, my utility handles all usual ASCII forms of newlines - \r, \n and \r\n (and \n\r for good measure).