From: Meino Christian Cramer <Meino.Cramer@gmx.de>
To: zsh-users@sunsite.dk
Subject: OT: How to list all but the last item
Date: Mon, 18 Sep 2006 18:39:59 +0200 (CEST) [thread overview]
Message-ID: <20060918.183959.74746293.Meino.Cramer@gmx.de> (raw)
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
next reply other threads:[~2006-09-18 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-18 16:39 Meino Christian Cramer [this message]
2006-09-18 17:02 ` Will Maier
2006-09-18 17:17 ` Meino Christian Cramer
2006-09-18 17:17 ` Stephane Chazelas
2006-09-18 17:23 ` Meino Christian Cramer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060918.183959.74746293.Meino.Cramer@gmx.de \
--to=meino.cramer@gmx.de \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).