Re: [Parameter substring expansion not work for negative offset]

2013-09-09 Thread Frantisek Hanzlik
Greg Wooledge wrote: > On Sun, Sep 08, 2013 at 11:21:56AM -0500, Dennis Williamson wrote: >> The man page says "Note that a negative offset must be separated from the >> colon by at least one space..." > > Enclosing the negative offset in parentheses also works. > > The reason you must use either

[Parameter substring expansion not work for negative offset]

2013-09-08 Thread hanzlik
. But this construct return me all $A string. Repeat-By: $ A="abcd0"; E1=${A:-1:1}; E2=${A:-1}; echo "A=$A, E1=$E1, E2=$E2." A=abcd0, E1=abcd0, E2=abcd0. # I expect result E1==E2=="0", right? Sorry if I made some mistake here. With regards, Franta Hanzlik