Re: [PATCH] parallel-checkout: use grep -c to count workers in tests
- From
René Scharfe <l.s.r@web.de>
- Date
- Jun 5, 2021, 15:30 UTC
- Message-ID
- <eb8e938f-1308-6200-5484-e009f6e4c625@web.de>
- In-Reply-To
- <a946daaa-6aa8-8527-5b55-ccf86de2a9d7@web.de>
Am 05.06.21 um 17:20 schrieb René Scharfe:
Show 12 quoted lines
> Am 05.06.21 um 16:31 schrieb Matheus Tavares Bernardino: >> On Sat, Jun 5, 2021 at 9:27 AM René Scharfe <l.s.r@web.de> wrote: >> Just one >> minor nit: I think we could drop the redirection as grep can take the >> file name as an argument. > > I'm not sure if there's a grep out there that prints the filename before > the count even if it deals with a single file. git grep does that, at > least. POSIX[3] implies the lack of filename prefix for the single file > case, but I don't know if we can rely on that everywhere. > > [3] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
Except we got plenty of "grep -c" calls with a single filename and no redirection in t/ already. Adding one more should be fine.
René