Hi Chris,<br><br><div class="gmail_quote">On Fri, Oct 8, 2010 at 9:44 AM, Chris Muller <span dir="ltr">&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; Of course.  Try it and see.  This is a shell issue.  What&#39;s the syntax to<br>
&gt; supply an arg containing spaces.  On Unix there are<br>
&gt; two^H^H^Hthree^H^H^H^H^Hfour ways.  Escape spaces with back slashes, use IFS<br>
&gt; to make space a non-separator and separate words using e.g. TAB (I think<br>
&gt; this works), surround the argument with single quotes or surround the arg<br>
&gt; with double quotes.<br>
<br>
</div>Right I did try all of those things of course (except adjusting IFS),<br>
but it appears that Squeak puts its own interpretation onto these<br>
arguments differently from the shell.  IOW, Squeak appears to be doing<br>
a simple subStrings operation regardless of escape-characters when<br>
loading up the systemAttribute array...  For example:<br>
<br>
  st &#39;1000 factorial&#39;    &lt;----- Squeak gets 2 args, &#39;1000&#39; and &#39;factorial&#39;<br>
  st &quot;1000\ factorial&quot;    &lt;----- Squeak gets 2 args, &#39;1000\&#39; and &#39;factorial&#39;<br>
<br>
Strings are a challenge because the shell does not allow single-ticks<br>
inside of single-ticks, but one can use Symbols:<br>
<br>
  st &#39;#hello asString asUppercase&#39;   &lt;--------- Squeak gets 3 args...<br>
<br>
My goal is to deliver a &quot;Smalltalk command-line&quot;.  I did find that<br>
your stdin works, so I can do:<br>
<br>
  st &lt;&lt;printit<br>
&#39;hello&#39; asUppercase<br>
printit<br>
<br>
works.  :)<br></blockquote><div><br></div><div><br></div><div>    Bert is very probably right.  If you&#39;re suing bourne/bash then look up the difference between $*, &quot;$*&quot;, $@ and &quot;$@&quot;.  To preserve spaces you need to use $@/&quot;$@&quot; (depending on context&quot; *not* $*.  Also within your script you can use IFS to prevent space being a separator.</div>
<div><br></div><div>HTH</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
<br>
&gt;&gt;<br>
&gt;&gt; I actually want to allow the Linux user to specify a chunk of code<br>
&gt;&gt; (which contains spaces) on the command-line.<br>
&gt;&gt;<br>
&gt;&gt; I tried enclosing it in ticks, but Squeak still loaded each<br>
&gt;&gt; system-attribute into its own slot.  Interestingly, it did not include<br>
&gt;&gt; the beginning or ending tick.<br>
&gt;&gt;<br>
&gt;&gt; So, it looks like I could assemble all of the pieces, separatedBy:<br>
&gt;&gt; Character space, but that would limit the chunk to 997 &quot;words&quot;..<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>