Screwtape

Screwtape at

I was trying to write a portable sed script recently, and POSIX basic regexes are the worst, so I figured I'd use POSIX extended regexes instead. The GNU sed manpage says "The -E option switches to using extended regular expressions instead; the -E option has been supported for years by GNU sed, and is now included in POSIX." so that's obviously the thing to use.

In code-review I got pulled up because -E is not listed in the POSIX sed specification. Stack Overflow points to an issue in the POSIX issue-tracker where -E was added to the spec, but although the issue was resolved in 2012, the change is still not present in the 2016 edition.

So, that's a friendly heads-up to not trust the GNU sed manpage.

clacke@libranet.de ❌, AJ Jordan likes this.

AJ Jordan, AJ Jordan, AJ Jordan, AJ Jordan shared this.

So... the POSIX spec moves fast, huh? =)

JanKusanagi at 2018-03-14T23:31:35Z

AJ Jordan likes this.