Running Script made in Visual Studio Code (on windows) on WSL Ubuntu returns âline 2: $'r': command not foundâ [closed]

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
When I try to run a script made with Visual Studio Code on Windows in my Ubuntu WSL installation, I get the error:
line 2: $'r': command not found
I ran into the question below:
How do I fix "$'r': command not found" errors running Bash scripts in WSL?.
That all makes sense, however is there a way/setting on Visual Studio Code on windows to not have to use the dos2unix utility every time?
bash scripts windows-subsystem-for-linux visual-studio-code
closed as off-topic by muru, N0rbert, Fabby, David Foerster, Kevin Bowen May 18 at 5:10
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â muru, N0rbert, Fabby, David Foerster, Kevin Bowen
add a comment |Â
up vote
1
down vote
favorite
When I try to run a script made with Visual Studio Code on Windows in my Ubuntu WSL installation, I get the error:
line 2: $'r': command not found
I ran into the question below:
How do I fix "$'r': command not found" errors running Bash scripts in WSL?.
That all makes sense, however is there a way/setting on Visual Studio Code on windows to not have to use the dos2unix utility every time?
bash scripts windows-subsystem-for-linux visual-studio-code
closed as off-topic by muru, N0rbert, Fabby, David Foerster, Kevin Bowen May 18 at 5:10
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â muru, N0rbert, Fabby, David Foerster, Kevin Bowen
See Create portable, custom editor settings with EditorConfig - in particular theend_of_lineproperty
â steeldriver
May 15 at 0:31
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
When I try to run a script made with Visual Studio Code on Windows in my Ubuntu WSL installation, I get the error:
line 2: $'r': command not found
I ran into the question below:
How do I fix "$'r': command not found" errors running Bash scripts in WSL?.
That all makes sense, however is there a way/setting on Visual Studio Code on windows to not have to use the dos2unix utility every time?
bash scripts windows-subsystem-for-linux visual-studio-code
When I try to run a script made with Visual Studio Code on Windows in my Ubuntu WSL installation, I get the error:
line 2: $'r': command not found
I ran into the question below:
How do I fix "$'r': command not found" errors running Bash scripts in WSL?.
That all makes sense, however is there a way/setting on Visual Studio Code on windows to not have to use the dos2unix utility every time?
bash scripts windows-subsystem-for-linux visual-studio-code
edited May 15 at 3:30
ubashu
2,23721736
2,23721736
asked May 15 at 0:20
0siris
185
185
closed as off-topic by muru, N0rbert, Fabby, David Foerster, Kevin Bowen May 18 at 5:10
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â muru, N0rbert, Fabby, David Foerster, Kevin Bowen
closed as off-topic by muru, N0rbert, Fabby, David Foerster, Kevin Bowen May 18 at 5:10
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â muru, N0rbert, Fabby, David Foerster, Kevin Bowen
See Create portable, custom editor settings with EditorConfig - in particular theend_of_lineproperty
â steeldriver
May 15 at 0:31
add a comment |Â
See Create portable, custom editor settings with EditorConfig - in particular theend_of_lineproperty
â steeldriver
May 15 at 0:31
See Create portable, custom editor settings with EditorConfig - in particular the
end_of_line propertyâ steeldriver
May 15 at 0:31
See Create portable, custom editor settings with EditorConfig - in particular the
end_of_line propertyâ steeldriver
May 15 at 0:31
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
In the bottom-right corner of the window there is an indicator that
saysCLRForLF[highlighted in green on the picture] which will let you set the line endings for a
particular file. Clicking on the text will allow you to change the
line endings as well.
CRis a bytecode for carriage return (from the days of typewriters) andLFsimilarly, for line feed. It just refers to the bytes that are placed as end-of-line markers.
Sources and references:
Visual Studio Code: How to show line endings.
VSC on GitHub: How to replace characters as newline break.- Difference between CR LF, LF and CR line break types?
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
In the bottom-right corner of the window there is an indicator that
saysCLRForLF[highlighted in green on the picture] which will let you set the line endings for a
particular file. Clicking on the text will allow you to change the
line endings as well.
CRis a bytecode for carriage return (from the days of typewriters) andLFsimilarly, for line feed. It just refers to the bytes that are placed as end-of-line markers.
Sources and references:
Visual Studio Code: How to show line endings.
VSC on GitHub: How to replace characters as newline break.- Difference between CR LF, LF and CR line break types?
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
add a comment |Â
up vote
2
down vote
accepted
In the bottom-right corner of the window there is an indicator that
saysCLRForLF[highlighted in green on the picture] which will let you set the line endings for a
particular file. Clicking on the text will allow you to change the
line endings as well.
CRis a bytecode for carriage return (from the days of typewriters) andLFsimilarly, for line feed. It just refers to the bytes that are placed as end-of-line markers.
Sources and references:
Visual Studio Code: How to show line endings.
VSC on GitHub: How to replace characters as newline break.- Difference between CR LF, LF and CR line break types?
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
In the bottom-right corner of the window there is an indicator that
saysCLRForLF[highlighted in green on the picture] which will let you set the line endings for a
particular file. Clicking on the text will allow you to change the
line endings as well.
CRis a bytecode for carriage return (from the days of typewriters) andLFsimilarly, for line feed. It just refers to the bytes that are placed as end-of-line markers.
Sources and references:
Visual Studio Code: How to show line endings.
VSC on GitHub: How to replace characters as newline break.- Difference between CR LF, LF and CR line break types?
In the bottom-right corner of the window there is an indicator that
saysCLRForLF[highlighted in green on the picture] which will let you set the line endings for a
particular file. Clicking on the text will allow you to change the
line endings as well.
CRis a bytecode for carriage return (from the days of typewriters) andLFsimilarly, for line feed. It just refers to the bytes that are placed as end-of-line markers.
Sources and references:
Visual Studio Code: How to show line endings.
VSC on GitHub: How to replace characters as newline break.- Difference between CR LF, LF and CR line break types?
edited May 15 at 17:15
answered May 15 at 4:18
pa4080
11.9k52255
11.9k52255
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
add a comment |Â
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Sorry, I committed this common mistake and didn't read the question to the end, before threw my answer. Then I found my answer is incorrect and the question is off topic, but I decided to recreate my answer...
â pa4080
May 15 at 4:45
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
Thank you for the quick reply. I also appreciate you posting the sources, it was educational and makes sense.
â 0siris
May 15 at 15:17
add a comment |Â

See Create portable, custom editor settings with EditorConfig - in particular the
end_of_linepropertyâ steeldriver
May 15 at 0:31