Re: help, help scripting masters

From: <captgoodnight@acsalaska.net>
Date: Sun Mar 21 2004 - 22:00:16 AKST

Nope, has to be the path complete. I've used all forms of quotes too.
The script takes the path/folder name, places it in a variable, then uses it within the script for all
sorts of actions. The only way I've been able to get around this is using a while
loop

while read line
do echo "mv" $line
done < test | sed -e 's/ /\\ /g' -e 's/mv\\/mv/' > renaming_script.sh
./renaming_script.sh

then using the new named folder in a proceding variable which has the spaces removed.
I've tried arrays too

yup="folder with spaces"
foo=($(echo $yup | sed 's/ /\\ /g'))
cd `echo -n ${foo[*]}` #nope, [0] only
cd $(echo -n ${foo[*]}) #nope, [0] only

but the escapes get removed as soon as the variable is used. I would really like to get rid of the while loop method,
too messy.

hope that makes sense, kinda hard for me to explain.

thanks in advance,

eddie
 

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Mar 21 22:00:24 2004

This archive was generated by hypermail 2.1.8 : Sun Mar 21 2004 - 22:00:24 AKST