Hi On Thu, Aug 02, 2007 at 08:55:52AM +0200, Marc Haber wrote: > 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?
Otherwise it can not handle variables like this A_HERE="a b". But now I realize that it is not the case as I have changed the way of working. I'll remove that one. > > + 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. Yes I realized that just after I sent you the mail. The other patch is better. Regards, // Ola > 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 > -- --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ---- / [EMAIL PROTECTED] Annebergsslingan 37 \ | [EMAIL PROTECTED] 654 65 KARLSTAD | | http://opalsys.net/ Mobile: +46 (0)70-332 1551 | \ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 / --------------------------------------------------------------- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]