Are you really running that from the unix shell prompt? Because I can get something like that error by typing that command at the R prompt:
$ R
[startup noises]
> Rscript foo.r
Error: unexpected symbol in "Rscript foo.r"
Otherwise its something in your script that is similarly screwed up.
When run from the Unix command prompt, all is well:
$ Rscript test.R
[1] 1.414214
where test.R
is simply print(sqrt(2))