Date: Sat, 13 Sep 2003 10:46:02 +0800 From: Eugene Grosbein <eugen@kuzbass.ru> To: FUJISHIMA Satsuki <sf@FreeBSD.org> Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/56558: [PATCH] locate(1) cannot be safely used with xargs(1) Message-ID: <3F6284EA.7367348B@kuzbass.ru> References: <200309120520.h8C5KGNV016093@freefall.freebsd.org> <86d6e6qk2l.wl@gray.plala.or.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
FUJISHIMA Satsuki wrote: > > > command | tr '\n' '\0' | xargs -0 foo > > > would work for any commands, not limited to locate(1). > > > > It will break when filename contains '\n' that is allowed. > > Don't worry. > > If our locate(1) is implemented enough to satisfy its manpage, it > does not store newline and NUL into DB. Actually, any input will be > chopped by '\n'. So you would never get unexpected newline. > > quoted from locate(1): > Historically, locate only stored characters between 32 and 127. The cur- > rent implementation store any character except newline (`\n') and NUL > (`\0'). (...) It is misfeature then. Why? Eugene Grosbein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F6284EA.7367348B>