Also, assuming the patch is useful, I copy/pasted the following bash string replacement to report the script name:

``` ${0##*/}

```

but in retrospect, I think this one is more readable:

``` ${0/#*\//}

```

and may amount to the same thing; I'm certainly not the final authority on bash scripting.

:-/