Re: Count lines in a textfile
Re: Count lines in a textfile
- Subject: Re: Count lines in a textfile
- From: Gnarlodious <email@hidden>
- Date: Thu, 16 Sep 2004 18:54:08 -0600
Title: Re: Count lines in a textfile
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 '$=' "
-- Gnarlie
_______________________________________________
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