Re: help, help scripting masters

From: <captgoodnight@acsalaska.net>
Date: Mon Mar 22 2004 - 20:29:43 AKST

Okay, I have a better way to ask my question, that is the problem here. Sorry. So,
a simple idea, this is what I'm trying to basically do.

#!/bin/sh

workem_ ()
{
ls "$FOLDER"
}

case $1 in
--folder|-f)
        FOLDER=`echo $2`
        workem_;;
*) exit;;
esac

>$ ./test.sh -f folder\ with\ spaces

no go

>$ ./test.sh -f folder

works

A big thank you if ya can make adjustments to that so as to make it work with spaces and crazies.

Sometimes the idea works with spaces, usually not though. Crazy characters make it puke. Spaces and crazy characters are
required in the real workem_ function, only to confirm that the folder exists, and to cd into it.
Maybe I should try getopts instead.?

PS- quotes, quotes, quotes, -- I KNOW! ;)

thanks,
eddie
  

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Mon Mar 22 20:29:59 2004

This archive was generated by hypermail 2.1.8 : Mon Mar 22 2004 - 20:29:59 AKST