Mail archive
alpine-aports

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

From: Nathan Angelacos <nangel_at_nothome.org>
Date: Thu, 12 Mar 2015 09:45:17 -0400

>>
>> I think you need to change the last line to:
>>
>> -e "/^.*(auth)[^ ]* /${skip}D" \
>>

Thanks Natanael, you are right. Looks like you went ahead and fixed my
patch. Thanks!


>> 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 ?

tl;dr - it works as expected with both busybox and gnu sed.

Sysklogd.daily, just printing out /etc/syslog.conf:

# ./sysklogd.daily
/var/log/cron.log
/var/log/daemon.log
/var/log/kern.log
/var/log/lpr.log
/var/log/mail.log
/var/log/user.log
And now with --auth
/var/log/auth.log
/var/log/debug
/var/log/messages
/var/log/syslog

# apk add sed
(1/1) Installing sed (4.2.2-r0)
Executing busybox-1.23.1-r0.trigger
OK: 49 MiB in 41 packages

# ./sysklogd
/var/log/cron.log
/var/log/daemon.log
/var/log/kern.log
/var/log/lpr.log
/var/log/mail.log
/var/log/user.log
And now with --auth
/var/log/auth.log
/var/log/debug
/var/log/messages
/var/log/syslog

-----

# apk del sed
(1/1) Purging sed (4.2.2-r0)
Executing sed-4.2.2-r0.post-deinstall
Executing busybox-1.23.1-r0.trigger
# echo "aaabbb" | sed -E -e 's/\(a+\)\(b+\)/\2\1/'
aaabbb
# echo "aaabbb" | sed -E -e 's/(a+)(b+)/\2\1/'
bbbaaa
# apk add sed
(1/1) Installing sed (4.2.2-r0)
Executing busybox-1.23.1-r0.trigger
OK: 49 MiB in 41 packages
# echo "aaabbb" | sed -E -e 's/\(a+\)\(b+\)/\2\1/'
sed: -e expression #1, char 20: invalid reference \2 on `s' command's RHS
# echo "aaabbb" | sed -E -e 's/(a+)(b+)/\2\1/'
bbbaaa






>
>



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Mar 12 2015 - 09:45:17 GMT