[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28304: Feature Request - Quit on Non Match
From: |
Adam Danischewski |
Subject: |
bug#28304: Feature Request - Quit on Non Match |
Date: |
Thu, 31 Aug 2017 10:43:30 -0400 |
I've been writing parsers and it would be really nice if grep could do the
following:
*grep --quit-nm 1 -Pno "^[ \t\f]*#.*$" <(sed -n '2,$p' gen_ent.bsh)*
If you:
*grep -m 1 -Pno "^[ \t\f]*#.*$" <(sed -n '2,$p' gen_ent.bsh)*
Only the first match of the header block gets printed, yet it would be nice
if grep in O(n), could simply be on the look out for the first failure to
match the -o context and quit at --quit-nm non-match occurrences.
- bug#28304: Feature Request - Quit on Non Match,
Adam Danischewski <=