[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65416: Feature request: include first line of file in output
From: |
Carlo Arenas |
Subject: |
bug#65416: Feature request: include first line of file in output |
Date: |
Tue, 22 Aug 2023 23:20:19 -0700 |
> Daniel Green <ddgreen@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
- bug#65416: Feature request: include first line of file in output, Daniel Green, 2023/08/21
- bug#65416: Feature request: include first line of file in output, arnold, 2023/08/21
- bug#65416: Feature request: include first line of file in output, Daniel Green, 2023/08/21
- bug#65416: Feature request: include first line of file in output, Paul Jackson, 2023/08/23
- bug#65416: Feature request: include first line of file in output, Paul Jackson, 2023/08/23
- bug#65416: Feature request: include first line of file in output, Daniel Green, 2023/08/23
- bug#65416: Feature request: include first line of file in output, Paul Jackson, 2023/08/23
- bug#65416: Feature request: include first line of file in output, Daniel Green, 2023/08/24
- bug#65416: Feature request: include first line of file in output, lacsaP Patatetom, 2023/08/29