Hey, thanks for the report. This is a bug on our side. When you type a script in the browser editor on Windows, it inserts CRLF \r\n, and the \r ends up in the command that runs via bash. That’s why you see Unexpected token "\r". We don’t currently normalize CRLF to LF on this path. I’ve filed an internal report.
Workarounds for now:
Put the commands on one line using &&, with no line breaks: echo "Foo" && echo "Bar"
Or write the script in an editor that uses LF line endings, then paste the final text in, avoiding line breaks typed directly in the browser.
If none of that works, let me know and we’ll dig in more.