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

Re: alternative method for a simple for



2009/9/15 Sebastian Stark <seb-zsh@xxxxxxxxxxx>:
>
> On 15.09.2009, at 10:40, Joke de Buhr wrote:
>
>> On Tuesday 15 September 2009 05:54:19 d.henman wrote:
>>
>> Maybe you want to use the short version of for. It's rather short
>>
>>  for file (*wav) ffmpeg -b 160k -i $file $file:r.mp3
>>
>> or
>>
>>  for file (*wav) { ffmpeg -b 160k -i $file $file:r.mp3 }
>>
>> That's short and clear syntax.
>
> It is also incompatible and deprecated syntax :)

I think you're thinking of
for file in *.wav; command here
instead of
for file in *.wav; do command here; more commands; done

AFAIK, for file (list) {commands} isn't deprecated, just zsh-specific.

-- 
Mikael Magnusson



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