[pass] [PATCH 1/1] sed(1) compatibility

Dahlberg, David david.dahlberg at fkie.fraunhofer.de
Tue Feb 9 13:22:49 CET 2016

Am Dienstag, den 09.02.2016, 12:44 +0100 schrieb Lenz Weber:
> As far as I know, it should, when called with -E and -r switch, but I
> only vaidated this on Mac OSX (which should be directly taken from
> BSD).
> Are you sure about this behaviour?

OSX userland is from FreeBSD. Please try the following anyway: 

echo "foo.gpg" \
	| sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g'

-> OpenBSD will print "foo.gpg"

echo "foo.gpg" \
	| sed -E -r 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\( ->\|$\)/\1\2/g'

-> OpenBSD will print "sed: 1: "s/ ...: \1 not defined in the RE"

echo "foo.gpg" \
	| sed 's/\.gpg\(\x1B\[[0-9]\+m\)\{0,1\}\($\)/\1\2/g'

-> OpenBSD will print "foo"



More information about the Password-Store mailing list