zsh-users
 help / color / mirror / code / Atom feed
* OT: How to list all but the last item
@ 2006-09-18 16:39 Meino Christian Cramer
  2006-09-18 17:02 ` Will Maier
  2006-09-18 17:17 ` Stephane Chazelas
  0 siblings, 2 replies; 5+ messages in thread
From: Meino Christian Cramer @ 2006-09-18 16:39 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-09-18 17:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-18 16:39 OT: How to list all but the last item Meino Christian Cramer
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

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).