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

Re: OT: How to list all but the last item



From: Will Maier <willmaier@xxxxxxx>
Subject: Re: OT: How to list all but the last item
Date: Mon, 18 Sep 2006 12:02:57 -0500

> On Mon, Sep 18, 2006 at 06:39:59PM +0200, Meino Christian Cramer wrote:
> >  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???
> 
> sed(1).
> 
> eg:
> 
>     /etc % jot 5
>     1
>     2
>     3
>     4
>     5
> 
>     /etc % jot 5 | sed -e '$d'
>     1
>     2
>     3
>     4
> 
> -- 
> 
> [Will Maier]-----------------[willmaier@xxxxxxx|http://www.lfod.us/]
> 

...and then light strucks me! :)

Thanks a lot, Will!

Keep hacking!
mcc



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