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

Re: list last modified files



2015-08-20 16:55:52 +0100, Peter Stephenson:
[...]
>   set -- 1 2 3 4 5 6
>   for one two three; do
>     print $one $two $three
>   done
> 
> 1 2 3
> 4 5 6
> 
> and you can replace "one" by "in" if you lke, but don't.
[...]

Note that you can also do:

for one two three do
  print $one $two $three
done

Note that "for i do" is Bourne and POSIX while "for i; do" is
neither (though there's talk of making it standard in the next
version of POSIX since most modern shells support it, and
it's a common idiom).

-- 
Stephane



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