[Tutor] Number of lines in a file

Praveen Pathiyil ppathiyi@cisco.com
Wed, 9 May 2001 16:04:16 +0530


This is a multi-part message in MIME format.

------=_NextPart_000_06F2_01C0D8A1.B2637290
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

    How do i find the number of lines in a file (On UNIX)?

    tell() returns the position in terms of characters, right ?

TIA,
Praveen.
  =20

------=_NextPart_000_06F2_01C0D8A1.B2637290
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3103.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; How do i find the =
number of=20
lines in a file (On UNIX)?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;tell() returns =
the position=20
in terms of characters, right ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>TIA,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Praveen.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;</FONT></DIV></BODY></HTML>

------=_NextPart_000_06F2_01C0D8A1.B2637290--