Subject: Re: Trailing / in pathnames passed to
To: None <>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-toolchain
Date: 08/16/2004 15:10:14
>> +       OPTARG=`echo ${OPTARG} | sed -e 's/\/$//'`
>> Any comments?

> Looks good to me.  (though I'll note s:/$:: works as well and avoids
> an escape which tends to turn most sed expressions into line noise.)

Well, it will break if $OPTARG contains shell metacharacters; should it
maybe have " " in some places?

Also, is there some reason not to use OPTARG="${OPTARG%/}" instead?  Is
this one of the scripts that tries to stick to least-common-denominator
capabilities and thus can't use the ${...%...} syntax?

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B