* Arnaud Lacombe wrote on Sat, Nov 20, 2010 at 05:58:13AM CET: > --- a/libgo/mksysinfo.sh > +++ b/libgo/mksysinfo.sh > @@ -79,7 +79,7 @@ grep '^const _E' gen-sysinfo.go | \ > > # The O_xxx flags. > grep '^const _\(O\|F\|FD\)_' gen-sysinfo.go | \ > - sed -e 's/^\(const \)_\(\(O\|F\|FD\)_[^= ]*\)\(.*\)$/\1\2 = _\2/' >> ${OUT} > + sed -e 's/^\(const \)_\(\([A-Za-z0-9_]\{1,\}\)_[^= ]*\)\(.*\)$/\1\2 = > _\2/' >> ${OUT} > if ! grep '^const O_CLOEXEC' ${OUT} >/dev/null 2>&1; then \ > echo "const O_CLOEXEC = 0" >> ${OUT} > fi
Good catch. Alternation is not portable in sed, but nested grouping \(\(...\)...\) is not fully portable either, neither is \U. There are a few instances of those in this file. Thanks, Ralf