Re: Count lines in a textfile
Re: Count lines in a textfile
- Subject: Re: Count lines in a textfile
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 16 Sep 2004 18:02:17 -0700
Title: Re: Count lines in a textfile
On 9/16/04 5:54 PM, "Gnarlodious" <email@hidden> wrote:
Entity Stefan Eriksson spoke thus:
> Anyone got a tip on how to count number of lines in a text-document,
> i´ve been testing to read how many ASCII Character 10/13 there are in a
> text-file but can´t get some accurate figures out of it... any ideas ?
set filePath to POSIX path of (choose file)
do shell script "cat " & the quoted form of filePath & " | tr '\\r' '\\n' | sed -n '$=' "
What's wrong with paragraphs, as others have suggested? Why go through all that palaver?
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden