<br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 1:53 PM, Sean P. DeNigris <span dir="ltr">&lt;<a href="mailto:sean@clipperadams.com">sean@clipperadams.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;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&gt;&gt;waitForCommand: with a<br>
&quot;No such file or directory&quot; 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>
&#39;/usr/bin/osascript -ss  &lt;&lt;-EOF<br>
tell application &quot;Safari&quot; to activate<br>
tell application &quot;Terminal&quot; to activate<br>
EOF&#39;<br>
<br>
double-quoted string:<br>
&#39;/usr/bin/osascript -ss  -e &quot;<br>
tell application \&quot;Safari\&quot; to activate<br>
tell application \&quot;Terminal\&quot; to activate&quot;&#39;<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&#39;ll find it&#39;ll work.  OSP is an interface to exec.  A shell is an interface to exec.  OSP doesn&#39;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>&quot;<br>tell application \&quot;Safari\&quot; to activate<br>tell application \&quot;Terminal\&quot; to activate&quot;</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), &#39;tell application &quot;Safari&quot; to activate&#39;, (String with: Character lf), &#39;tell application &quot;</span>Terminal<span class="Apple-style-span">&quot; to activate&#39;</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>