|
From: | Matthew Woehlke |
Subject: | Re: feature request: -0 option for tr |
Date: | Mon, 29 Jun 2009 17:43:04 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 |
Bob Proulx wrote:
Craig Sanders wrote:spaces and quote characters and even backslashes in filenames are far more common, especially on systems were files are uploaded by users from non-unix systems (e.g. ftp upload to web servers, samba file servers, etc)Yes. And cursed they are but so it is. :-)
Oh, come on. I know all about the "inherent danger", and I still use spaces in my file names, and probably always will. It's simply easier for us humans to think that way.
(I have yet to encounter a newline in a file name, however...)
As I read it you are using an encoding of converting newline terminated data to zero terminated data and then using the commands that work with zero terminated data. Which is okay as it stands. But that doesn't make sense to me. Since you want to work with newline terminated data you could just use the tools as they are presently to work with newline terminated data. Don't try to force them into a zero terminated model as a facade over the underlying newline terminated model.
What about programs that only understand whitespace or NUL as delimiters? (Granted, in my case, I generally only have "problems" with find and xargs, for which "xargs -d '\n'" is my preferred solution.)
-- Matthew Please do not quote my e-mail address unobfuscated in message bodies. -- ...yzarc gniog ylwols era uoY
[Prev in Thread] | Current Thread | [Next in Thread] |