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

OT: How to list all but the last item



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