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

somehow offtopic: looping filenames



Hi,

how can I do this in a most compact, direct, and zsh like way:

I habe a loop like this:

for fn *
do
    flac $fn
done

Unfortunately, some file have 'illegal' filenames like

    20120220-_-19db.wav
or
    20120220 sensor10 up.wav


which parts flac sees as unknown commmand options or as
two file and the loop fails.

How do I have to modifiy the loop to make it immune against
such filenames ?

Thank you very much in advance for any help!

Best regards
mcc



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