X-Original-To: alpine-aports@lists.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from ncopa-desktop.alpinelinux.org (unknown [79.160.13.133]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id C13D7DC0160; Thu, 12 Mar 2015 07:12:02 +0000 (UTC) Date: Thu, 12 Mar 2015 08:11:59 +0100 From: Natanael Copa To: Nathan Angelacos Cc: alpine-aports@lists.alpinelinux.org Subject: Re: [alpine-aports] [PATCH] main/sysklogd: remove GNUism and use POSIX Extended Regular Expressions (EREs) Message-ID: <20150312081159.5e532b9b@ncopa-desktop.alpinelinux.org> In-Reply-To: <1426109305-19657-1-git-send-email-nangel@alpinelinux.org> References: <1426109305-19657-1-git-send-email-nangel@alpinelinux.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-alpine-linux-musl) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 11 Mar 2015 21:28:25 +0000 Nathan Angelacos 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 > @@ -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" > @@ -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 -nc --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---