Re: Escape Apostrophes in 'Do Shell Script'
Re: Escape Apostrophes in 'Do Shell Script'
- Subject: Re: Escape Apostrophes in 'Do Shell Script'
- From: Emmanuel <email@hidden>
- Date: Fri, 7 Nov 2003 07:51:40 +0100
At 10:44 AM -0800 06/11/03, Christopher Nebel wrote:
>
perl -e 'print "What'\''s Up?";'
>
>
Or, in AppleScript with the extra backslashes:
>
>
do shell script "perl -e 'print \"What'\\''s Up?\";'"
>
>
It's not clear to me how to solve this problem in a general way.
Smile has a keyboard shortcut (cmd-") ("Make an AppleScript string" menu item) which makes:
perl -e 'print "What'\''s Up?";'
into:
"perl -e 'print \"What'\\''s Up?\";'"
The shortcut just changes \ into \\ and then " into \".
Since you are asking, would it take more than that to provide a new "AppleScript form" property to strings which would do what you say? But maybe I'm missing something.
------------------------
do shell script (AppleScript form of ("perl -e " & quoted form of (blah blah)))
------------------------
Emmanuel
_______________________________________________
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.