Hallo, Am Mon, 15 Mär 2010, Christian Brabandt schrieb:
On Mo, 15 Mär 2010, David Haller wrote:
Hm. Kannst du mal den Abschnitt aus der manpage angucken (ich komm erst morgen wieder dazu die 11.2 zu booten). Scheint mir ne Änderung oder ein Bug der Bash zu sein, daß ${parameter//%pattern/value} nicht mehr wie gewohnt funktioniert.
Sieht mir auch wie ein Bug aus. Ich teste gelegentlich mal das letzte Release.
,----[ man bash ]- | ${parameter/pattern/string} | Pattern substitution. The pattern is expanded to produce a pat- | tern just as in pathname expansion. Parameter is expanded and | the longest match of pattern against its value is replaced with | string. If pattern begins with /, all matches of pattern are | replaced with string. Normally only the first match is | replaced. If pattern begins with #, it must match at the begin- | ning of the expanded value of parameter. If pattern begins with | %, it must match at the end of the expanded value of parameter. | If string is null, matches of pattern are deleted and the / fol- | lowing pattern may be omitted. If parameter is @ or *, the sub- | stitution operation is applied to each positional parameter in | turn, and the expansion is the resultant list. If parameter is | an array variable subscripted with @ or *, the substitution | operation is applied to each member of the array in turn, and | the expansion is the resultant list. `----
*ARGH* Die Schweine! Die ändern einfach die Syntax (Semantik?). Bisher war's: / erstes Match // alle matches + Modifier: % am Ende # am Anfang (siehe manpage Zitat von mir). Andererseits scheint es im Ergebnis keinen Unterschied zu machen, _SOLANGE_ man eben nicht versucht // mit # oder % zu kombinieren. *grmbl* Danke auch an Ralf. -dnh, der sich wohl mal die Release-Notes angucken sollte, ob's da auftaucht. -- "The only "intuitive" interface is the nipple. After that, it's all learned." -- Bruce Ediger on X interfaces. -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um eine Liste aller verfuegbaren Kommandos zu bekommen, schicken Sie eine Mail an: opensuse-de+help@opensuse.org