• 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: Find and replace space by the Terminal equivalent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find and replace space by the Terminal equivalent


  • Subject: Re: Find and replace space by the Terminal equivalent
  • From: Barry Wainwright <email@hidden>
  • Date: Sun, 02 Oct 2005 06:56:45 -0700
  • Thread-topic: Find and replace space by the Terminal equivalent

Yeah, sorry about that - the slash does need to be escaped. I forgot that in
my quick write up.

--
Barry



> From: "Mark J. Reed" <email@hidden>
> Reply-To: <email@hidden>
> Date: Sun, 02 Oct 2005 08:20:27 -0400
> To: Jay Louvion <email@hidden>
> Cc: Barry Wainwright <email@hidden>, AS AppleScript Users
> <email@hidden>
> Subject: Re: Find and replace space by the Terminal equivalent
>
> "\ " isn't a legal AppleScript string literal. You need to double the \.  "\\
> ".
>
>
> On 10/2/05, Jay Louvion <email@hidden> wrote:
>>  le 2/10/05 13:02, Barry Wainwright à email@hidden est réputé(e) avoir
>> écrit :
>>
>>
>> If you are trying to pass a text string to the shell command line, you can
>> just use 'quoted form of ...':
>>
>>      quoted form of "this is a 'test' string"
>>          -- "'this is a '\\''test'\\'' string'"
>>
>>  This will allow you to send commands such as:
>>      set myString to "Hello World!"
>>      do shell script "echo "& quoted form of myString
>>
>>  However, if this is not what you want, then the quickest way to accomplish
>> your actual request is to use the TIDs:
>>
>>  Set myString to "Hello World!"
>>  Set {oldTIDs, applescript's text item delimiters} to { applescript's text
>> item delimiters, {" "}}
>>  Set myString to text items of myString
>>  Set Applescript's text item delimiters to {"\ "}
>>  Set myString to Mystring as text
>>  Set applescript's text item delimiters to oldTIDs
>>
>>
>>  Sorry to seem a bit cheeky, there, but does that last piece of text
>> actually compile for you?
>>  Because I'm actually trying to use the TIDS but the {"\ "} bit just doesn't
>> compile. I remember a discussion about that kind of thing, but unfortunately
>> I didn't save it...
>>
>>  J.
>>
>>
>>  Jay Louvion
>>  Studio Casagrande
>>  3, rue Müller-Brun
>>  1208 Geneva
>>
>>  T+4122 840 3272
>>  F+4122 840 3271
>>
>>  skypeme:
>>  jaylouvion
>>
>>  www.studiocasagrande.com
>>
>>
>>  _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Applescript-users mailing list
>> (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>>
>>
>
>
> --
> 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:

This email sent to email@hidden

References: 
 >Re: Find and replace space by the Terminal equivalent (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Find and replace space by the Terminal equivalent
  • Next by Date: Re: Find and replace space by the Terminal equivalent
  • Previous by thread: Re: Find and replace space by the Terminal equivalent
  • Next by thread: Re: Find and replace space by the Terminal equivalent
  • Index(es):
    • Date
    • Thread