• 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: Shane Stanley <email@hidden>
  • Date: Fri, 29 Feb 2008 10:57:02 +1100
  • Thread-topic: linebreak in a shell script; was Re: What's wrong with this call to zip?

On 29/2/08 8:59 AM, "Mark J. Reed" <email@hidden> wrote:

> The ASCII commands don't necessarily use MacRoman, right?  It depends
> on your locale settings.

I presume so, but I haven't tried it myself.
>
>>  Also, a linefeed following a carriage return is a single Unicode character
>>  (with two code points)
>
> I don't get this, and I thought I was pretty darn familiar with
> Unicode.  What's the story?

I don't know anything other than how it seems to work. For example, in
Leopard:

set x to "blah" & return & linefeed & "blah"
count of characters of x --> 9
character 5 of x --> in Script Debugger, "\r\n"
id of character 5 of x --> {13, 10}
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {linefeed}
count of text items of x --> 1
set AppleScript's text item delimiters to oldDelims

(The result is the same if you use ASCII character 10 instead of the
built-in linefeed.)
--
Shane Stanley <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

  • Follow-Ups:
    • Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
      • From: Philip Aker <email@hidden>
    • Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: linebreak in a shell script; was Re: What's wrong with this call to zip? (From: "Mark J. Reed" <email@hidden>)

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