> Daniel Green <ddgr...@gmail.com> wrote: > > > I've never looked at the grep source code > > before, but could be tempted to try implementing it myself if there was any > > chance of the path being accepted.
A slightly more complicated perl script would be my first choice if coding is the solution, but grep already has a feature that could be used to provide a solution as shown by the following scriptlet (including an scaled data file) : $ cat > c.csv USER,TIP john,0 jane,10 carenas,100 $ ( grep -m1 USER && grep carenas ) < c.csv USER,TIP carenas,100 Carlo