Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Parameter Expansion til Explosion



It sounds like you want to do something like:

mv filename "`mp3info --whatever --option filename`"

	-dath

On Sunday 11 March 2007 08:47:09 pm meino.cramer@xxxxxx wrote:
> Hi,
>
>  ...it is really killing me.
>
>  I read through zshall ("Parameter Expansion" "* Expansion") but
>  everything I tried failed.
>
>  I want to rename mp3 files from a non speaking name like 001.mp3
>  to one describing the contents of the mp3.
>
>  The problem are the spaces in the final filename. My script uses
>  mp3info to produce two parameters for "mv":
>
>  mv `<call to mp3info> <filename>`
>
>  replacing mv with echo produces (for example):
>
>  "001.mp3" "The eternal clock - Timeless part 1,mp3"
>
>  Adding "mv" lead to an error:
>
>    Directory 1.mp3 does not exist.
>
>  due to the spaces in the target filename.
>
>  I tried to surround both with extra instances of
>
>    \\\"
>
>  but nothing helps.
>
>  Is there any "final recipe" to cope with these [CENSORED]
>  windows-like filenames containing any character ?
>
>  Thank you very much for any help in advance!
>
>  Desperate,
>  mcc




Messages sorted by: Reverse Date, Date, Thread, Author