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

Re: list last modified files



On Aug 20,  2:29pm, Peter Stephenson wrote:
}
} On Thu, 20 Aug 2015 15:08:02 +0200
} rooom <rooom@xxxxxxxxxxx> wrote:
} > BTW, what is 'in'?
} 
} It's simply a syntactic marker specific to "for" which looks for it in
} the list of arguments.  In the original shell syntax it's not
} really doing much except make it a bit more readable since you're forced
} to use "for var in ...", but zsh makes a virtue of it by allowing you
} to do "for var1 var2... in ..." --- unless your variable is called "in",
} obviously, in which case you can't.

Well ...

torch% for in in in; do print $in; done
in
torch% for in in in in in; do print $in; done
in
in
in
torch% unset in
torch% for out in out in out; do print in:$in out:$out; done
in: out:out
in: out:in
in: out:out
torch% for in out in out in; do print $in $out; done
out in
torch%




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