applescript - Automator replacing character with apple script or shell script -


i creating automator process need take string , replace "\" characters character "/". working buddy decided use shell script open this. line wrote, error.

set input (do shell script "echo \"" & input & "\" | sed 's/\\\\//g'") 

thanks

try:

set mystring "this\\is\\my\\string" -- this\is\my\string  set {tid, text item delimiters} {text item delimiters, "\\"} set mystring text items of mystring set text item delimiters "/" set mystring mystring text set text item delimiters tid  return mystring 

or

set input "this\\is\\my\\string" -- this\is\my\string set output shell script "echo " & quoted form of input & " | sed 's/[\\]/\\//g'" 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -