On Thu, Aug 02, 2007 at 08:25:06AM +0200, Ola Lundqvist wrote: > +general_varmove() { > + PREFIX=$1 > + STORE=$2 > + SIFS=$IFS > + IFS=" > +"
Why is the IFS needed here? > + LIST=$(set | grep "^[a-zA-Z][a-zA-Z0-9_]*_$PREFIX" | sed -e "s|=.*||;") > + for PVAR in $* ; do This looks wrong. The value assigned to LIST is never actually used, and here is a part of the output of bash -x: ++ set ++ grep '^[a-zA-Z][a-zA-Z0-9_]*_HERE' ++ sed -e 's|=.*||;' + LIST= + for PVAR in '$*' ++ echo HERE ++ sed -e 's|_HERE$||g;' + VVAR=HERE + '[' -n STORED ']' + eval SVAR=HERE_STORED ++ SVAR=HERE_STORED + eval 'HERE_STORED=$' ++ HERE_STORED='$' + eval 'HERE=$HERE' ++ HERE= + eval 'unset HERE' ++ unset HERE + for PVAR in '$*' ++ echo STORED ++ sed -e 's|_HERE$||g;' + VVAR=STORED + '[' -n STORED ']' + eval SVAR=STORED_STORED ++ SVAR=STORED_STORED + eval 'STORED_STORED=$' ++ STORED_STORED='$' + eval 'STORED=$STORED' ++ STORED= + eval 'unset STORED' ++ unset STORED + IFS=' the variable names HERE_STORED and STORED_STORED look wrong. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]