Subject: Re: [ast-users] Question about ksh: warning: line 1: > within ${}
should be quoted
--------
> Can some one please explain the following warning:
>
> ksh -n -c 'str="<hello> <world>" ; dummy="${str//~(E-g)<.*> (<.*>)}" ;
> print -v .sh.match'
> /bin/ksh: warning: line 1: < within ${} should be quoted
> /bin/ksh: warning: line 1: > within ${} should be quoted
>
> Why should < and > be quoted? <.*> (<.*>) look like a valid extended
> regex to me and changing < to \< and > to \> changes the meaning.
>
> Olga
>
At some point in the rather distant past (before adding ~(E) to pattern
patching), I was planning some expansions that would used <, |, and > as
operators within ${...} expansions. Therefore, I wanted to warn people
if they used them without quoting them.
I guess I should remove the warning since it no longer seems to apply.
David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users