On Mon, Mar 22, 2004 at 08:29:43PM -0900, captgoodnight@acsalaska.net <captgoodnight@acsalaska.net> wrote:
>
> A big thank you if ya can make adjustments to that so as to
> make it work with spaces and crazies.
You know what, I can help you with this one.
The problem is in this line:
> FOLDER=`echo $2`
The phrase enclosed in `` gets replaced with the output of the
command inside. The echo command spits out what's on its command
line. So, if $2 has the value "folder with spaces" (no quotes),
then
FOLDER=`echo $2`
will be replaced with
FOLDER=folder with spaces
Note that the spaces are no longer quoted or otherwise included in
the string. The shell will make the assignment FOLDER=folder, and
then try to execute the "with" command.
It would probably work to say
FOLDER="`echo $2`"
but it's easier and clearer to simply say
FOLDER=$2
That's all that's necessary.
-- Bryan Medsker bryan@ak.net --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.Received on Mon Mar 22 22:17:10 2004
This archive was generated by hypermail 2.1.8 : Mon Mar 22 2004 - 22:17:10 AKST