I added a bit to it ...

Code:
alias bk2 {
  var %x = 1, %result = ""
  while (%x <= $gettok($1-,0,32)) {
    var %i = $len($gettok($1-,%x,32))
    while (%i > 0) {
      var %o = $+(%o,$mid($gettok($1-,%x,32),%i,1))
      dec %i
    }
    inc %x
    set %result $instok(%result,%o,$calc($numtok(%result,32) + 1),32)
    unset %o
  }
  if ($isid) return %result
  echo -s %result
}
I *think* that this is what you want, but not sure.


"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke