bash: lines of a file in reverse order?

Kush be_a_sport-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Aug 24 21:08:22 UTC 2006


Maybe this might work

tail -50  filename | tac |  grep -m 1 "matching" 

Kush


Interlug wrote:
> tail -50 -r filename | grep -m 1 "matching" 
> would grab it for me if it exists in the last 50 lines of the log.  
>
> Surely this is being done elsewhere.  Got a pointer? 
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20060824/f4236d24/attachment.html>


More information about the Legacy mailing list