Re: egrep
From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 06/24/05
- Previous message: Ed Morton: "Re: egrep"
- In reply to: Smokie: "egrep"
- Next in thread: Smokie: "Re: egrep"
- Reply: Smokie: "Re: egrep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 24 Jun 2005 16:12:46 -0400
On 2005-06-24, Smokie wrote:
> Hello,
>
> I am looking for a command to print a few lines of the output.
>
> ie.
> /sbin/ifconfig -a | egrep -l "13-20"
> A command below that will print out lines 13 - 20.
>
> Is their a command that will do this??
> I am searching through google but unable to find a thing...??
Ed's suggestion (sed -n '13,20p'), does what you ask, but that is
probably not the best way. How do you know that it will always be
lines 13 to 20 that you need?
Not knowing what you are really trying to do, it's hard to make any
better suggestions.
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
==================================================================
Shell Scripting Recipes: A Problem-Solution Approach, 2005, Apress
<http://www.torfree.net/~chris/books/cfaj/ssr.html>
- Previous message: Ed Morton: "Re: egrep"
- In reply to: Smokie: "egrep"
- Next in thread: Smokie: "Re: egrep"
- Reply: Smokie: "Re: egrep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|