how to escape pipe symbol | in bat scripts?
30,808
Use a caret.
eg.
echo %0 on^|off
Author by
Prashant Bhate
Updated on September 18, 2022Comments
-
Prashant Bhate over 1 year
I need to echo commad usage like this in batch script named command.bat
command.bat on|off
I cant use
echo %0 on|off
I know I can use
echo "%0 on|off"
but it puts quotes along
Is there any other way?