grep, etc

Jay R. Ashworth jra at baylink.com
Fri Aug 13 21:55:17 PDT 2004


On Wed, Aug 11, 2004 at 04:26:03PM -0400, Bob Stockler wrote:
> | i WANT TO BE ABLE TO VIEW A RANGE OF LINE USING GREP, MORE OR AWK.   IS THIS POSSIBLE.   IE FROM -213 TO -216
> 
> Yes.
> 
>   awk '
>   {
>     if ( $NF = "-213" ) { OK++ ; print ; next }
>     if ( $NF = "-216" ) { print ; exit }
>     if ( OK ) print
>   }' filename

You're always *so* awkward, Bob. 

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the Filepro-list mailing list