Escape angle brackets in a Windows command prompt
cmd, escaping, windows
Solution
The Windows escape character is ^, for some reason.
echo some string ^< with angle ^> brackets >>myfile.txt
Problem
I need to echo a string containing angle brackets (< and >) to a file on a Windows machine. Basically what I want to do is the following: `echo some string < with angle > brackets >>myfile.txt` This doesn't work since the command interpreter gets confused with the angle brackets. I could quote the whole string like this: `echo "some string < with angle > brackets" >>myfile.txt` But then I have double quotes in my file that I don't want. Escaping the brackets ala unix doesn't work either: `echo some string \< with angle \> brackets >>myfile.txt` Ideas?