Bash: $'\r': command not found

Hi Good day, I tried to run this one command below:
root@38976fdbafee:~/testnetwork/Node# /data/contracts/rps/



and this is the result:
bash: $‘\r’: command not found
bash: $‘\r’: command not found

what could be the problem?

I tried to follow a youtube tutorial for pyteal algorand => Algorand PyTeal Course | Rock Paper Scissors #3 - Byteslice Operations and Compilation Errors - YouTube

1 Like

One potential issue is that you have the wrong line endings in your file: Windows and Linux have different way of indicating line ending.

See bash - '\r': command not found - .bashrc / .bash_profile - Stack Overflow for solutions for that problem. Concretely:

dos2unix /data/contracts/rps/

if dos2unix is not available and your OS is Ubuntu:

apt-get update
apt-get install dos2unix

You can also read for example How to Get Consistent Line Breaks in VS Code (LF vs CRLF) - DEV Community if you’re using VS Code.

If this does not work, can you provide the file you tried to use (as well as where you got it from - e.g., exact min of the video or other resource)?

1 Like