Index: openacs-4/packages/acs-lang/bin/mygrep =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/bin/mygrep,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-lang/bin/mygrep 24 Oct 2002 09:06:39 -0000 1.1 +++ openacs-4/packages/acs-lang/bin/mygrep 16 Oct 2003 14:05:50 -0000 1.2 @@ -25,11 +25,13 @@ # Take input from STDIN or from files my $have_match = 0; while ($line = <>) { - if ($line =~ /$pattern/) { + while ($line =~ /$pattern/) { if (defined($1)) { print STDOUT "$1\n"; } - + + # Do next matching on whatever comes after last match + $line=$'; $have_match = 1; } }