• 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: Jay Louvion <email@hidden>
  • Date: Sun, 02 Oct 2005 17:02:40 +0200

Title: Re: Find and replace space by the Terminal equivalent
le 2/10/05 14:20, Mark J. Reed à email@hidden est réputé(e) avoir écrit :

> "\ " isn't a legal AppleScript string literal. You need to double the \.  "\\
> ".
>

I understood things until there. Unfortunately, the wanted result isn’t possible then ?

This is what I’ve got for the moment:

set Target to “
/Users/ptilu/Desktop/Copy Stuff/”
set Target to (FindReplace(" ", "/\\ ", Target))
on FindReplace(FindWhat, ReplaceBy, ThisString)
    copy the text item delimiters to OldDelims
   set the text item delimiters to {FindWhat}
    set tempList to every text item of ThisString
   set the text item delimiters to {ReplaceBy}
    set newString to tempList as text
   set the text item delimiters to OldDelims
   return newString
end FindReplace

But the output is not “do shell” compatible:
/Users/ptilu/Desktop/Copy/\\ Stuff/

Full script as attachment. Using osxutils.

Jay Louvion
Studio Casagrande
3, rue Müller-Brun
1208 Geneva

T+4122 840 3272
F+4122 840 3271

skypeme:
jaylouvion

www.studiocasagrande.com

Attachment: IconSetter.zip
Description: Binary data

 _______________________________________________
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

  • Follow-Ups:
    • Re: Find and replace space by the Terminal equivalent
      • From: Barry Wainwright <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: iCal and Applescript (beginner)
  • 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