Hello.

$ showargs() {
   local i=0 a
   echo \$\#=$#
   for a; do
    echo \$$((i=i+1))=$a
   done
}
$ set -- ab bb bc

$ showargs "${@#b}"
$#=3
$1=ab
$2=bb
$3=bc

but need:
$#=3
$1=ab
$2=b
$3=c

$ showargs "${@%bb}"
$#=2
$1=ab
$2=

but need:
$#=3
$1=ab
$2=
$3=bc

$ echo "${*%b}"
ab bb bc

but need:
a b bc

etc etc

I wanted to make a fix, but the code is easier to completely rewrite
than fix. :(


--w
vodz

Reply via email to