Re: Mac or UNIX file
Re: Mac or UNIX file
- Subject: Re: Mac or UNIX file
- From: Barry Wainwright <email@hidden>
- Date: Wed, 06 Dec 2006 15:41:09 +0000
- Thread-topic: Mac or UNIX file
On 5/12/06 20:52, "Chris Swain" <email@hidden> wrote:
> I have a script that reads a very large file into a list, adds data to each
> item in the list then saves it.
> The problem I have is that sometimes the file has UNIX line endings other
> times Mac, and if it is a Mac file I need to save it as a Mac file and vice
> versa.
>
> I have written two versions of the script one to deal with each, but I can't
> see how I might combine them such that I detect the line endings and then call
> the appropriate version, I don't want to spend time reading in the file
> incorrectly.
>
Using 'paragraphs of...' should work for both line endings.
--
Barry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden