David Whedon <[EMAIL PROTECTED]> wrote:
> - if [ -z "$BASH_VERSION" ]; then
> - tdir=`echo $directory | tr / _`
> - else
> - tdir=${directory//\//_}
> - fi
> + tdir=`echo $directory | tr / _`
Here's a way to do it that works with any POSIX shell (make sure that the
shell arguments are not needed later or save them):
OIFS="$IFS"
IFS=/
set -f
set $directory
set +f
IFS=_
tdir="$*"
IFS="$OIFS"
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]