Hi Chris,<br><br><div class="gmail_quote">On Fri, Oct 8, 2010 at 9:44 AM, Chris Muller <span dir="ltr"><<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> Of course. Try it and see. This is a shell issue. What's the syntax to<br>
> supply an arg containing spaces. On Unix there are<br>
> two^H^H^Hthree^H^H^H^H^Hfour ways. Escape spaces with back slashes, use IFS<br>
> to make space a non-separator and separate words using e.g. TAB (I think<br>
> this works), surround the argument with single quotes or surround the arg<br>
> 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 '1000 factorial' <----- Squeak gets 2 args, '1000' and 'factorial'<br>
st "1000\ factorial" <----- Squeak gets 2 args, '1000\' and 'factorial'<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 '#hello asString asUppercase' <--------- Squeak gets 3 args...<br>
<br>
My goal is to deliver a "Smalltalk command-line". I did find that<br>
your stdin works, so I can do:<br>
<br>
st <<printit<br>
'hello' asUppercase<br>
printit<br>
<br>
works. :)<br></blockquote><div><br></div><div><br></div><div> Bert is very probably right. If you're suing bourne/bash then look up the difference between $*, "$*", $@ and "$@". To preserve spaces you need to use $@/"$@" (depending on context" *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>
>><br>
>> I actually want to allow the Linux user to specify a chunk of code<br>
>> (which contains spaces) on the command-line.<br>
>><br>
>> I tried enclosing it in ticks, but Squeak still loaded each<br>
>> system-attribute into its own slot. Interestingly, it did not include<br>
>> the beginning or ending tick.<br>
>><br>
>> So, it looks like I could assemble all of the pieces, separatedBy:<br>
>> Character space, but that would limit the chunk to 997 "words"..<br>
>><br>
><br>
><br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>