Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!postnews.google.com!r11g2000prd.googlegroups.com!not-for-mail
From: TideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how could i run this code? and what big mistake in it?
Date: Tue, 2 Aug 2011 00:47:14 -0700 (PDT)
Organization: http://groups.google.com
Lines: 22
Message-ID: <5cdfccc5-21f6-47d9-8929-88ea75f7a26c@r11g2000prd.googlegroups.com>
References: <j16r0b$6h6$1@newscl01ah.mathworks.com> <j16t82$e1r$1@newscl01ah.mathworks.com>
 <j179g0$n49$1@newscl01ah.mathworks.com> <j17h52$deb$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1312271234 7703 127.0.0.1 (2 Aug 2011 07:47:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 2 Aug 2011 07:47:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r11g2000prd.googlegroups.com; posting-host=202.78.152.105; posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUALESNKRC
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:738380

On Aug 2, 12:42 pm, "Roger Stafford"
<ellieandrogerxy...@mindspring.com.invalid> wrote:
> "Jan Simon" wrote in message <j179g0$n4...@newscl01ah.mathworks.com>...
> > Dear Roger,
> > You have counted the number of lines.
> > Wow.
> > Kind regards, Jan
>
> - - - - - - - - - - - -
>   No, Jan, I have better ways of spending my time than that.  I copied and pasted the whole lot into Microsoft Word and used its line count tool.
>
> Roger Stafford

Another way is to use Perl:
perl('countlines.pl','test.txt')

where coutlines.pl is:
while (<>) {};
print $.,"\n";