On Mon, Feb 15, 2016 at 04:56:18PM -0500, Chris Staub wrote: > On 02/15/2016 04:32 PM, Ken Moffat wrote: > > > >What seems to be happening is that grep-2.23 used with -v discards > >too much, grep-2.22 was ok. > > > >My commands have evolved, the listing comes down to the following, > >reformatted to one part per line with numbers added at end > > > >find -H / -xdev -type f -o -type l | \ # 001 > >sed 's%^/mnt/lfs%%' | \ # 002 > >grep -v '^/logs' | \ # 003 > >grep -v '^/misc' | \ # 004 > >grep -v '^/building' | \ # 005 > >grep -v '^/tmp' | \ # 006 > >sed 's/\x20/\\\ /g' | \ # 007 > >xargs ls -l | \ # 008 > >sed 's%\([^/]*\)\(.*\)%\2 \1%' # 009 > > > >All is fine in the first two steps, but removing any line which > >starts '/logs' does far more. > > > >root in chroot /# wc -l /tmp/list002 /tmp/list003 > > 37121 /tmp/list002 > > 1495 /tmp/list003 > > > >and the diff starts: > > > >--- /tmp/list002 2016-02-15 20:38:16.966065542 +0000 > >+++ /tmp/list003 2016-02-15 20:38:39.717790746 +0000 > >@@ -1492,35630 +1492,4 @@ > > /usr/share/doc/kbd-2.0.3/iso8859-4.txt > > /usr/share/doc/kbd-2.0.3/utf/utflist > > /usr/share/doc/kbd-2.0.3/utf/ethiopic > >-/usr/share/doc/kbd-2.0.3/utf/<E2><99><AA><E2><99><AC> > >-/usr/share/doc/kbd-2.0.3/utf/utfdemo > >-/usr/share/doc/kbd-2.0.3/utf/README > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-21.html > >-/usr/share/doc/kbd-2.0.3/iso8859-6.txt > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-9.html > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-1.html > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-17.html > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-13.html > >-/usr/share/doc/kbd-2.0.3/kbd.FAQ-16.html > >-/usr/share/doc/kbd-2.0.3/iso8859-14.txt > >-/usr/share/doc/kbd-2.0.3/iso8859-1.txt > >-/usr/share/doc/kbd-2.0.3/iso8859-10.txt > > > >and finally gets to > >-/bin/cat > >-/bin/cp > >-/bin/bzcat > >-/bin/lsattr > >+Binary file (standard input) matches > > > >Can anybody confirm this sort of problem with grep-2.23 ? Or am I > >misusing those grep -v commands ? > > > >FWIW, the final sed rearranges the fields so that the filename comes > >first - that aids the comparison. > > > Do you get similar results with slightly different grep commands - for > example, does it do the same if you leave out the "^" and just do "grep -v > '/logs'"?
Yes. Identical. ĸen -- This email was written using 100% recycled letters. -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
