I think the quotes are wrong. Try using single or double quotes rather than
apostrophes (admittedly it can be rather hard to tell in some fonts)

julia -e "for x in ARGS; println(x); end" foo bar


On Sun, Jun 8, 2014 at 6:32 PM, Brandon Hartz <[email protected]> wrote:

>
>
> I am new to julia and am trying to just get my feet wet. I am working
> through the Julia PDF and am trying to do
>
> $ julia -e ’for x in ARGS; println(x); end’ foo bar
> foo
> bar
>
> which should print the result
>
> foo
> bar
>
> but I get the error "syntax: extra token "for" after end of expression."
> For clarity, I am already in a Julia setting so I excluded the word Julia
> from the line, though I have tried both ways.
>
> Could someone explain to me what the end of the expression might be or why
> this isn't working? Any help understanding this would be greatly
> appreciated.
>

Reply via email to