Hi Eric, thanks for the suggestion. I had considered the idea for a second, but failed to see the nontrivial half.
* Eric Blake wrote on Mon, Jun 28, 2010 at 02:49:40PM CEST: > tmp=${1#?} > patt= > i=2 > while test $i -lt ${#1}; do > patt="?$patt" If the parameter may be expected to be very long (which I don't think it will be) then func_append patt '?' would be useful here, and even if not, appending rather than prepending here helps with current bash. > i=$((i+1)) > done > result=${tmp%$patt} Cheers, Ralf