• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
reading files in the system folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading files in the system folder


  • Subject: reading files in the system folder
  • From: Malcolm Fitzgerald <email@hidden>
  • Date: Wed, 19 Oct 2005 11:49:23 +1000

I'd like to play with words. There is a copy of websters dictionary at /usr/share/dict so that looks like a handy resource. Unfortunately I can't get at it in the manner I'd expect.

try
	set d to read file "/usr/share/dict/web2"
on error m number n
	{m, n}
end try

--> {"File /usr/share/dict/web2 wasn't found.", -43}


Of course web2 is there, I can get at the file contents using "do shell script"


set wordCount to (word 1 of (do shell script "wc -l /usr/share/dict/web2")) - 26
--> 234911


I'd like to know why AppleScript can't find the file?


Malcolm Fitzgerald ph: 02 93180877 Database Manager fax: 02 93180530 The Australian Society of Authors www.asauthors.org

_______________________________________________
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


  • Follow-Ups:
    • Re: reading files in the system folder
      • From: kai <email@hidden>
  • Prev by Date: Re: Getting a handler to use a value from a different handler?
  • Next by Date: Re: filemaker applescript question
  • Previous by thread: Re: Excel Scripting
  • Next by thread: Re: reading files in the system folder
  • Index(es):
    • Date
    • Thread