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:43:06
>>>> +       OPTARG=`echo ${OPTARG} | sed -e 's/\/$//'`
>> Well, it will break if $OPTARG contains shell metacharacters; should
>> it maybe have " " in some places?
> matter the metacharacters it's just stripping off a
> trailing /.

Is "echo ${OPTARG}" really safe in all shells even if ${OPTARG} is,
say, "/mnt/home->work"?  (It works fine in our sh, and I don't have
others handy to try.)

What about when ${OPTARG} is "-n a m e-"?  "/usr/***tmp***"?

/~\ 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