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

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



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/]



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