• 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
Re: Mac or UNIX file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Mac or UNIX file
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Mac or UNIX file (From: Chris Swain <email@hidden>)

  • Prev by Date: Re: Importing/parsing CSV files
  • Next by Date: Re: Mac or UNIX file
  • Previous by thread: Re: Mac or UNIX file
  • Next by thread: Re: Mac or UNIX file
  • Index(es):
    • Date
    • Thread