Timeline for Batch: Pipe command output to variable and compare
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 11, 2022 at 17:19 | comment | added | Martin Braun |
How to capture the%ERRORLEVEL% from echo 111 as well?
|
|
Sep 20, 2017 at 14:22 | comment | added | Gregor Isack | Learned a new thing! Thank you so much! | |
Sep 20, 2017 at 14:21 | vote | accept | Gregor Isack | ||
Sep 20, 2017 at 14:18 | history | edited | MC ND | CC BY-SA 3.0 |
added 198 characters in body
|
Sep 20, 2017 at 14:17 | comment | added | MC ND |
@GregorIsack, That means you can not use a pipe to change a variable and see the change inside the current batch file. If you need to store in a variable the output of a command use a for /f command
|
|
Sep 20, 2017 at 14:15 | comment | added | Gregor Isack |
Ah I see! So that means there is no way I can perform the "%readvalue%"=="%readvaluebash%" in one batch file? Probably the best workaround is to save into .txt first I guess?
|
|
Sep 20, 2017 at 14:10 | history | answered | MC ND | CC BY-SA 3.0 |