Mailing List Archive

[PATCH v2 4/5] qmail.eclass: egrep -> grep -E
Signed-off-by: Sam James <sam@gentoo.org>
---
eclass/qmail.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
index 471f2fe7ce5e..707cc91adfd8 100644
--- a/eclass/qmail.eclass
+++ b/eclass/qmail.eclass
@@ -452,7 +452,7 @@ qmail_tcprules_config() {
line="${ip}${tcpstring}"
for proto in smtp qmtp qmqp; do
f="${EROOT}${TCPRULES_DIR}/tcp.qmail-${proto}"
- egrep -qs "${line}" "${f}" || echo "${line}" >> "${f}"
+ grep -E -qs "${line}" "${f}" || echo "${line}" >> "${f}"
done
done
}
--
2.35.1
Re: [PATCH v2 4/5] qmail.eclass: egrep -> grep -E [ In reply to ]
Am Sonntag, 15. Mai 2022, 03:08:41 CEST schrieb Sam James:
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
> eclass/qmail.eclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
> index 471f2fe7ce5e..707cc91adfd8 100644
> --- a/eclass/qmail.eclass
> +++ b/eclass/qmail.eclass
> @@ -452,7 +452,7 @@ qmail_tcprules_config() {
> line="${ip}${tcpstring}"
> for proto in smtp qmtp qmqp; do
> f="${EROOT}${TCPRULES_DIR}/tcp.qmail-${proto}"
> - egrep -qs "${line}" "${f}" || echo "${line}" >> "${f}"
> + grep -E -qs "${line}" "${f}" || echo "${line}" >> "${f}"
> done
> done
> }

NACK, but for the simple reason that this doesn't need the extended syntax
at all. Just drop it and use plain grep here.

Eike
Re: [PATCH v2 4/5] qmail.eclass: egrep -> grep -E [ In reply to ]
On Sun, 2022-05-15 at 17:18 +0200, Rolf Eike Beer wrote:
> Am Sonntag, 15. Mai 2022, 03:08:41 CEST schrieb Sam James:
> > Signed-off-by: Sam James <sam@gentoo.org>
> > ---
> > eclass/qmail.eclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/eclass/qmail.eclass b/eclass/qmail.eclass
> > index 471f2fe7ce5e..707cc91adfd8 100644
> > --- a/eclass/qmail.eclass
> > +++ b/eclass/qmail.eclass
> > @@ -452,7 +452,7 @@ qmail_tcprules_config() {
> > line="${ip}${tcpstring}"
> > for proto in smtp qmtp qmqp; do
> > f="${EROOT}${TCPRULES_DIR}/tcp.qmail-${proto}"
> > - egrep -qs "${line}" "${f}" || echo "${line}" >> "${f}"
> > + grep -E -qs "${line}" "${f}" || echo "${line}" >> "${f}"
> > done
> > done
> > }
>
> NACK, but for the simple reason that this doesn't need the extended syntax
> at all. Just drop it and use plain grep here.

Does it use a regex at all? Maybe 'grep -F' would be more appropriate.

--
Best regards,
Micha? Górny