On Aug 4, 2008, at 1:18 PM, Andrey Chernov wrote:
echo 'fee\nfi\nfoe\nfum' | ./grep -v fi
echo 'fee\nfi\nfoe\nfum' | /usr/bin/grep -v fi
Example is broken, echo (for sh) supposed to be
echo 'fee
fi
foe
fum' | ...
Well, if your shell's built-in echo doesn't grok newlines, then /usr/
bin/printf works, as Daniel suggested. But using /bin/sh and a
multiline statement as you suggest shows the exact same problem:
% echo 'fee
> fi
> foe
> fum' | ./grep -v fi
% echo 'fee
> fi
> foe
> fum' | /usr/bin/grep -v fi
fee
foe
fum
(I'm much more interested in confirming whether the bug I see in BSD
grep is reproducible by others than debating how to get real newlines
from various shells.)
--
-Chuck
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"