[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69929: Can grep -q report matches in incomplete lines?
From: |
jackson |
Subject: |
bug#69929: Can grep -q report matches in incomplete lines? |
Date: |
Thu, 21 Mar 2024 21:58:41 -0500 |
User-agent: |
Cyrus-JMAP/3.11.0-alpha0-332-gdeb4194079-fm-20240319.002-gdeb41940 |
Paul Eggert wrote:
> although doable it would be a bit of a pain to program
yup - sure would be a pain.
If you're not sure whether your actual input of interest will end
in a newline, can you add one, to "feed grep's newline hunger",
thus for instance replacing your example:
grep -q foo <(sh -c 'printf foo ; sleep 30' &)
with:
grep -q foo <(sh -c 'printf foo ; echo ; sleep 30' &)
In any case, grep is quite line oriented, as implied by an early
sentence in the man page grep(1):
"PATTERNS is one or more patterns separated by newline characters,"
--
Paul Jackson
jackson@fastmail.fm
- bug#69929: Can grep -q report matches in incomplete lines?, Niels Möller, 2024/03/21
- bug#69929: Can grep -q report matches in incomplete lines?, Niels Möller, 2024/03/22
- bug#69929: Can grep -q report matches in incomplete lines?, jackson, 2024/03/22
- bug#69929: Can grep -q report matches in incomplete lines?, David G. Pickett, 2024/03/22
- bug#69929: Can grep -q report matches in incomplete lines?, David G. Pickett, 2024/03/22
- bug#69929: Can grep -q report matches in incomplete lines?, Dennis Clarke, 2024/03/23
- bug#69929: Can grep -q report matches in incomplete lines?, Martin Schulte, 2024/03/23
- bug#69929: Can grep -q report matches in incomplete lines?, David G. Pickett, 2024/03/24