[Tfug] Command-line fun

Christopher Robbins robbinsc at gmail.com
Thu May 14 10:38:18 MST 2009


That worked perfectly.  Thanks!

On Thu, May 14, 2009 at 9:20 AM, Stott, Will
<will.stott at ventana.roche.com>wrote:

>  Try: ls | tail -<n> for example “ls | tail -10” would limit to the last
> 10 results.
>
>
>
> Will
>
>
>  ------------------------------
>
> *From:* tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org] *On Behalf Of
> *Christopher Robbins
> *Sent:* Thursday, May 14, 2009 9:18 AM
> *To:* Tucson Free Unix Group
> *Subject:* [Tfug] Command-line fun
>
>
>
> Is there an easy way to limit the results of an "ls" command to the last 10
> (20, 30, n) results
> via the command-line?
>
> I have a Windows box running Cygwin (I can't have linux on this one :( ),
> and I'm trying to run
> a one-liner that will pull out the last 10 logs and see what version of
> software it ran.  I know how
> to run fgrep through it, then pull the version info out with sed - I just
> can't wrap my head around limiting
> the results with "ls".
>
> Any ideas?
>
> Thanks,
>
>    - Chris
>
> PS - I know I'm not as active on the list as I used to be (and I always
> missed the happy hour), but I finally left UA last month.
> Found greener pastures in private industry - I think it was more than
> overdue...
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>
>


-- 
Christopher P Robbins
Systems Programmer
Department of English - University of Arizona
1423 East University Blvd.
Modern Languages, Bldg. 67, Room 422
Tucson, Arizona 85719
Phone: (520) 621-3496
Email: robbinsc at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20090514/51ae5583/attachment-0002.html>


More information about the tfug mailing list