[SunHELP] grepping lines

Von E. Prahl sunhelp at sunhelp.org
Fri Feb 23 10:50:38 CST 2001


--------------E707854F55C35B25E9F2593C
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

try this,

perl -ne 'print if 2 .. 8' file

this will print lines two through eight.

von

baki wrote:

>  Hi all unix guru's.I want to "cat" a file and then choose all lines
> between 2 and 10.  how can i do this?Thanks

--------------E707854F55C35B25E9F2593C
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
try this,
<p>perl -ne 'print if 2 .. 8' file
<p>this will print lines two through eight.
<p>von
<p>baki wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1> Hi
all unix guru's.</font></font><font face="Arial"><font size=-1>I want to
"cat" a file and then choose all lines between 2 and 10.  how can
i do this?</font></font><font face="Arial"><font size=-1>Thanks</font></font></blockquote>

</body>
</html>

--------------E707854F55C35B25E9F2593C--




More information about the SunHELP mailing list