fixed common line filter
authorAllan Randall <allanr@sgi.com>
Tue, 22 Aug 2006 03:56:34 +0000 (03:56 +0000)
committerAllan Randall <allanr@sgi.com>
Tue, 22 Aug 2006 03:56:34 +0000 (03:56 +0000)
Merge of master-melb:xfs-cmds:26836a by kenmcd.

  fixed common line filter

130

diff --git a/130 b/130
index bbcc625f90c055101140395153340c701c55cc41..4a61508921736df27f7a06485fa73e65f5a20f06 100755 (executable)
--- a/130
+++ b/130
@@ -40,12 +40,12 @@ _cleanup()
 common_line_filter()
 {
     perl -ne 'if (/.*:(.*)/) {
-        if ( "$last_line" ne "$1" ) { print $_; $first_match=1; }
+        if ( "$last_line" ne "$1" ) { print "$_"; $first_match=1; }
         elsif ( $first_match==1 ) { print "*\n"; $first_match=0; }
         $last_line="$1";
     }
     else {
-        print $_
+        print $_; $last_line=$_;
     }'
 }