Subject: Re: Trailing / in pathnames passed to build.sh
To: None <tech-toolchain@NetBSD.org>
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 mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B