[ale] Problems w/ mv and sed

Stephen Touset stephen at touset.dyndns.org
Mon Dec 23 20:09:41 EST 2002


I have to escape the quotation marks, or they're interpreted by bash,
and not used to surround the filenames. I also tried adding in another
sed clause to escape the spaces (it's actually sed -e 's/\ /\\\ /g'),
but that didn't work either. mv would give errors about the character
"\" being an invalid parameter.

Stephen Touset

On Mon, 2002-12-23 at 19:50, Dana Powers wrote:
> Seems that the quotes are not working the way you expect. Try not escaping
> the quotes around the arguments to mv:
> do mv "$FILE" "` echo $FILE | sed -e 's/\.OK//'`";
> if this doesnt work (i believe it should), try escaping the spaces in the
> FILE variable:
> do VAR="`echo $FILE | sed -e 's/ /\\ /g'`"; mv $FILE `echo $FILE | sed -e
> 's/\.OK//'`; done
> 
> dpk
> 
> ----- Original Message -----
> From: "Stephen Touset" <stephen at touset.dyndns.org>
> To: "ale Mailing List" <ale at ale.org>
> Sent: Monday, December 23, 2002 6:21 PM
> Subject: [ale] Problems w/ mv and sed
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale


 This is a digitally signed message part




More information about the Ale mailing list