Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
OT: How to list all but the last item
- X-seq: zsh-users 10732
- From: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: OT: How to list all but the last item
- Date: Mon, 18 Sep 2006 18:39:59 +0200 (CEST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hi,
may be this is a very stupid question...and may be I am blind...
But...
I want to contruct a loop like
for i in `<cmd>`
do
<do something> ${i}
done
and <cmd> should return a list of items matched by a regexp
or another kind of qualifier and skipping the last item.
Example:
ls -rtlc * | <???what???>
would return every item in a directory exept the newest one.
Is there any way to accomplish with something fitting in on
a commandline???
Thanks a lot for any hepl in advance!
Keep zshing!
mcc
Messages sorted by:
Reverse Date,
Date,
Thread,
Author