<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 1:53 PM, Sean P. DeNigris <span dir="ltr"><<a href="mailto:sean@clipperadams.com">sean@clipperadams.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm trying to pass a multiline argument, but none of the things that work in<br>
the shell seem to work with OSP.<br>
<br>
I passed both of the following to PipeableOSProcess>>waitForCommand: with a<br>
"No such file or directory" error, which usually means that the multiline<br>
part was not processed correctly. However, if I copy/paste them into the<br>
shell, they work fine<br>
<br>
heredoc:<br>
'/usr/bin/osascript -ss <<-EOF<br>
tell application "Safari" to activate<br>
tell application "Terminal" to activate<br>
EOF'<br>
<br>
double-quoted string:<br>
'/usr/bin/osascript -ss -e "<br>
tell application \"Safari\" to activate<br>
tell application \"Terminal\" to activate"'<br>
<br>
Why are these not working?<br></blockquote><div><br></div><div>OSP is not a shell. Ask yourself what a program receives when iyt is invoked with the two examples above. Then provide the equivalent argument to OSP and you'll find it'll work. OSP is an interface to exec. A shell is an interface to exec. OSP doesn't parse arguments, just passes them onto exec. A shell does parse arguments before passing them onto exec. So the shell input</div>
<div><br></div><div>"<br>tell application \"Safari\" to activate<br>tell application \"Terminal\" to activate"</div><div><br></div><div>is a string argument which in Smalltalk would be written</div>
<div><br></div><div><span class="Apple-style-span">(String with: Character lf), 'tell application "Safari" to activate', (String with: Character lf), 'tell application "</span>Terminal<span class="Apple-style-span">" to activate'</span></div>
<div> </div><div><br></div><div>HTH</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks.<br>
Sean<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://forum.world.st/OSProcess-and-multiline-input-tp4418726p4418726.html" target="_blank">http://forum.world.st/OSProcess-and-multiline-input-tp4418726p4418726.html</a><br>
Sent from the Squeak - Dev mailing list archive at Nabble.com.<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>