• 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: Problems with files on OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with files on OS X


  • Subject: Re: Problems with files on OS X
  • From: garbanzito <email@hidden>
  • Date: Fri, 22 Mar 2002 09:31:33 -0700

at 2002 03 22, 09:43 +0100, they whom i call Xavier Ambrosioni wrote:
2/ When i use the command:
'write my_text1 & return & my_text2 to my_file starting at eof'
there is only one line in my_file. If I open the file with vi on Terminal, I
can see the character "^M" in place of the return (or \n) character.

don't know about the write permission issue, but this one
has a good explanation ...

from the "Mac" perspective, there _are_ two lines in your
file because ^M (the carriage return character, ASCII 13) is
marks end-of-line for Mac files. AppleScript works from this
perspective. but from the BSD perspective line-feed (^J or
ASCII 10) is end-of-line and there appears to be only one
line.

some apps like TextEdit, handle this transparently, but for
unix command-line use, you might want to write your code to
use ASCII 10, or you could use "tr" on the command line to
fix files after the fact.

--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Problems with files on OS X (From: Xavier Ambrosioni <email@hidden>)

  • Prev by Date: Re:Changing properties in an applet from another script
  • Next by Date: Re: paste special problem
  • Previous by thread: Problems with files on OS X
  • Next by thread: Re: Problems with files on OS X
  • Index(es):
    • Date
    • Thread