[squeak-dev] script arguments with spaces

Eliot Miranda eliot.miranda at gmail.com
Thu Oct 7 19:08:57 UTC 2010


On Thu, Oct 7, 2010 at 11:49 AM, Chris Muller <ma.chris.m at gmail.com> wrote:

> To get the first argument to the Smalltalk startup script we have:
>
>   Smalltalk getSystemAttribute: 3
>
> but does anyone know whether this can be an argument with spaces?
>

Of course.  Try it and see.  This is a shell issue.  What's the syntax to
supply an arg containing spaces.  On Unix there are
two^H^H^Hthree^H^H^H^H^Hfour ways.  Escape spaces with back slashes, use IFS
to make space a non-separator and separate words using e.g. TAB (I think
this works), surround the argument with single quotes or surround the arg
with double quotes.


> I actually want to allow the Linux user to specify a chunk of code
> (which contains spaces) on the command-line.
>
> I tried enclosing it in ticks, but Squeak still loaded each
> system-attribute into its own slot.  Interestingly, it did not include
> the beginning or ending tick.
>
> So, it looks like I could assemble all of the pieces, separatedBy:
> Character space, but that would limit the chunk to 997 "words"..
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20101007/f49548b5/attachment.htm


More information about the Squeak-dev mailing list