Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] main/sysklogd: remove GNUism and use POSIX Extended Regular Expressions (EREs)

From: V.Krishn <vkrishn4_at_gmail.com>
Date: Thu, 12 Mar 2015 13:05:17 +0530

> On Wed, 11 Mar 2015 21:28:25 +0000
>
> Nathan Angelacos <nangel_at_alpinelinux.org> wrote:
> > ---
> >
> > main/sysklogd/sysklogd.daily | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/main/sysklogd/sysklogd.daily b/main/sysklogd/sysklogd.daily
> > index 723413d..3d98e8e 100755
> > --- a/main/sysklogd/sysklogd.daily
> > +++ b/main/sysklogd/sysklogd.daily
> > _at_@ -1,7 +1,7 @@
> >
> > #!/bin/sh
> > # This is a shell script replacement for the sysklogd's logrotate cron
> > script # and syslogd-listfiles perl script.
> >
> > -# Copyright (C) 2008 N. Angelacos for the Alpine Linux project - GPL2
> > +# Copyright (C) 2008-2015 N. Angelacos for the Alpine Linux project -
> > GPL2
> >
> > CONF="/etc/syslog.conf"
> >
> > _at_@ -25,9 +25,9 @@ syslogd_listfiles() {
> >
> > # deletes lines that are not filenames with leading "/"
> > # print it
> > while read a ; do echo "$a"; done < $CONF |\
> >
> > - sed -n -e "s/\#.*//" \
> > + sed -nE -e "s/\#.*//" \
> >
> > -e "/^[[:space:]]*$/D" \
> >
> > - -e "s/[[:space:]]\+/ /g" \
> > + -e "s/[[:space:]]+/ /g" \
> >
> > -e "s: -/: /:g" \
> > -e "s/ *; */;/" \
> > -e "/^.*\(auth\)[^ ]* /${skip}D" \
>
> I think you need to change the last line to:
>
> -e "/^.*(auth)[^ ]* /${skip}D" \
>
> Test case:
>
> $ echo "aaabbb" | sed -E -e 's/\(a+\)\(b+\)/\2\1/'
> aaabbb
> $ echo "aaabbb" | sed -E -e 's/(a+)(b+)/\2\1/'
> bbbaaa

Could someone also run this test after "apk add sed"
and see if they are as expected ?


-- 
Regards.
V.Krishn
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Mar 12 2015 - 13:05:17 GMT