Re: [Mesa-dev] [PATCH] Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD

2017-03-13 Thread Jan Beich
Eric Engestrom writes: > On Monday, 2017-03-13 11:56:45 +, Jan Beich wrote: > >> Eric Engestrom writes: >> >> >> +echo " `$1`" | sed -E \ >> >> +-e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \ [...] >> Do you want me to quote the whole function (including whitespace) >> instead? >>

Re: [Mesa-dev] [PATCH] Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD

2017-03-13 Thread Jan Beich
Eric Engestrom writes: >> +echo " `$1`" | sed -E \ >> +-e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \ > > These only work for me if I remove the outermost `[]` on each line, > leaving one pair around `:space:` and one for the set. > The above line, for instance, becomes: > -e 's/[[:spa

Re: [Mesa-dev] [PATCH] Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD

2017-03-13 Thread Eric Engestrom
On Monday, 2017-03-13 11:56:45 +, Jan Beich wrote: > Eric Engestrom writes: > > >> +echo " `$1`" | sed -E \ > >> +-e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \ > > > > These only work for me if I remove the outermost `[]` on each line, > > leaving one pair around `:space:` and one f

Re: [Mesa-dev] [PATCH] Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD

2017-03-13 Thread Eric Engestrom
On Sunday, 2017-03-12 03:19:14 +, Jan Beich wrote: > BSD regex library doesn't support extended RE escapes (e.g. \+) and > shorthand character classes (e.g. \s, \S) and SVR4-style word > delimiters[1] (on DragonFly and NetBSD). Both GNU and BSD sed support > -E and -r to enable extended RE but

[Mesa-dev] [PATCH] Convert sed(1) syntax to be compatible with FreeBSD and OpenBSD

2017-03-13 Thread Jan Beich
BSD regex library doesn't support extended RE escapes (e.g. \+) and shorthand character classes (e.g. \s, \S) and SVR4-style word delimiters[1] (on DragonFly and NetBSD). Both GNU and BSD sed support -E and -r to enable extended RE but OS X still lacks -r. [1] https://www.illumos.org/issues/516 --