Escaping shell script paths (was: Photo Processing , Gallery and IPTC Data app)
David Bovill
david at openpartnership.net
Fri Feb 1 04:30:36 EST 2008
Thanks for this Ian. I've a couple of questions if not anything to add...
- The applescript you start with.... I guess this deals with file
names on Mac that contain the "/" character for instance? What exaclty does
"set tOut to POSIX path of tPath" do?
- I use this command to escape any parameter in a shell command that
may contain strange chars - for instance comments. I guess your function
applies to these as well?
on shell_BashParamEscape @someParam
> replace space with ("\" & space) in someParam
> replace "|" with ("\" & "|") in someParam
> replace "(" with "\(" in someFile
> replace ")" with "\)" in someFile
> end shell_BashParamEscape
>
More information about the use-livecode
mailing list