Line end escaping with ^ expression can break next line parsing
#13
andry81
started this conversation in
Show and tell
Replies: 2 comments
-
|
Another case: call; & ^
"%COMSPEC%" /c echo 123 ^
echo 456Result: Workaround 1: call; & ^
call; & "%COMSPEC%" /c echo 123 ^
echo 456Result: Workaround 2: call; ^
& "%COMSPEC%" /c echo 123 ^
echo 456Result: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Another case: if 1 EQU 1 ^
"%SystemRoot%\System32\cmd.exe" /c @echo "1 & 2"Result: "1
'2"' is not recognized as an internal or external command,
operable program or batch file.Workaround 1: if 1 EQU 1 ^
call; & "%SystemRoot%\System32\cmd.exe" /c @echo "1 & 2"Result: "1 & 2"Workaround 2: if 1 EQU 1 call; ^
& "%SystemRoot%\System32\cmd.exe" /c @echo "1 & 2"Result: "1 & 2" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue:
Result:
Workaround:
Result:
Note
Operator
()does not have the issue and can be used instead of^.Beta Was this translation helpful? Give feedback.
All reactions