Escaping shell script paths (was: Photo Processing , Gallery and IPTC Data app)
Ian Wood
revlist at azurevision.co.uk
Fri Feb 1 07:24:24 EST 2008
On 1 Feb 2008, at 19:30, David Bovill wrote:
> 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?
Pretty much all it does is add the volume name if the filepath isn't
on the system partition.
> - 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?
Pretty much.
Ian
> 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
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list