[Novalug] bash & grep question - best for optimizing?
Tom Rhodes
trhodes at FreeBSD.org
Wed Nov 15 01:31:59 EST 2006
On Tue, 14 Nov 2006 19:17:49 -0500
James Ewing Cottrell 3rd <JECottrell3 at Comcast.NET> wrote:
> Ross Patterson wrote:
>
> > At 17:42 11/14/2006, James Ewing Cottrell 3rd wrote:
> >
> >> One could argue, and I will, that hacking -r into grep is an
> >> abomination. The tool for recursing is FIND.
> >
> > For general purpose tools, I agree. Of course, in that case, "ls" is
> > even more of an abomination than anyone who reads the man page
> > thinks. For the Only Correct Answer to the "show me my files"
> > question is, naturally, "find . -print".
>
> I agree in theory. But ls is such a basic command. Still, the lesson
> should have been learned from doing this. Or at the very least, from BSD
> implementing cp -r incorrectly (following symlinks).
*I* did that as to not destroy any scripts expecting cp to act
as previous versions while moving toward the future head chop
of "-r."
According to POSIX, any form of "-r" for cp(1) is correct since
it's an implementation defined flag.
--
Tom Rhodes
More information about the Novalug
mailing list