Re: Do shell script
Re: Do shell script
- Subject: Re: Do shell script
- From: Stevan Reese <email@hidden>
- Date: Wed, 25 Feb 2004 07:56:39 -0800
This is expected behavior because the "do shell script" command is
using /bin/sh to execute whatever you have quoted after "do shell
script".
The "\" character "escapes" the following character so that it is
passes correctly. AppleScript also uses this character for the same
purpose.
do shell script "\"open /Users/TripleZ/Desktop/Prog CSS/CSSEdit.app\""
should also work the same as
do shell script "open /Users/TripleZ/Desktop/Prog\ CSS/CSSEdit.app"
Sometimes you will find that you need more than one "\" because a
character needs to be escaped from AppleScript and the shell at the
same time.
do shell script "cat /tmp/test.txt | sed s/.*\\<//g | sed s/\\>.*//g"
regards
stevan
On Feb 25, 2004, at 7:27 AM, Gianfranco wrote:
Maybe this is a stupid question but if I use the Do shell script
command with spaces in the string the command didn't work
for example
do shell script "open /Users/TripleZ/Desktop/ProgCSS/CSSEdit.app"
the script works fine if I use
do shell script "open /Users/TripleZ/Desktop/Prog\ CSS/CSSEdit.app"
like in Terminal
or
do shell script "open /Users/TripleZ/Desktop/Prog CSS/CSSEdit.app"
the script didn't work any solution?
Thanks in advance.
Gianfranco
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.