Linda Walsh <[EMAIL PROTECTED]> wrote: > In my copy of the man pages, Pattern matching is indented an extra > level making it look like it's under Pathname Expansion and only > applies there....
Pattern matching applies primarily to pathname expansion; other uses explicitly refer to its use there: ${parameter/pattern/string} The pattern is expanded to produce a pattern just as in pathname expansion. Parameter is expanded and the longest match of pattern against its value is replaced with string. [...] > I wanted to leave "myswitch2" as the only thing left in $p; p=" $p " p=${p/* myswitch2 */myswitch} p=${p/ */} paul