• 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: linebreak in a shell script; was Re: What's wrong with this call to zip?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linebreak in a shell script; was Re: What's wrong with this call to zip?


  • Subject: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • From: "Mark J. Reed" <email@hidden>
  • Date: Wed, 27 Feb 2008 20:20:25 -0500

On Wed, Feb 27, 2008 at 7:05 PM, tom wible <email@hidden> wrote:
>  return is not newline

That depends.

>         property newline : "

I think that would be clearer if you defined it as "ascii character 10".

The term "newline" does not mean "linefeed", however.  It means
"whatever the local convention is for delimiting lines in text files",
be it carriage return, linefeed, both in sequence, the start of a new
rdbms row, whatever.  The C '\n' character is usually represented in
memory as a linefeed, but it's not required to be, and it is in any
case translated to whatever the local newline convention is - which is
why it's called "newline" and represented by '\n' instead of being
called "linefeed" and represented by '\l' or something.  (Some
C-family languages, such as Perl, do have a separate "\l" escape to
specifically mean linefeed, analogous to "\r" for carriage return, and
independent of "\n").

On most C implementations for OS <= 9, the character '\n' is actually
stored in memory as a carriage return, since that's the newline
convention on that OS; but since the C standard requires '\n' and '\r'
to be distinct, '\r' is stored in memory as a linefeed, and this
caused some confusion.

In any case, the Leopard AppleScript constant is named "linefeed", not
"newline".





--
Mark J. Reed <email@hidden>
 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

References: 
 >linebreak in a shell script; was Re: What's wrong with this call to zip? (From: tom wible <email@hidden>)

  • Prev by Date: Re: osascript: application isn't running. huh?
  • Next by Date: Re: osascript: application isn't running. huh?
  • Previous by thread: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • Next by thread: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • Index(es):
    • Date
    • Thread