Empty variable expansion in FOR /F
statement
#4
andry81
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Workaround: FOR /F "usebackq delims=" %%L in ('"!string:* =!"') do echo ...%%~L |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Started from: #3
@jeb-de Found the case where it does not work as expected:
, where you want to remove everything before the last space and the string can be empty before or after.
For example, if
ver
will return something likeMicrosoft Windows [Version X.Y.Z blabla]
orMicrosoft Windows [Version X.Y.Z ]
Beta Was this translation helpful? Give feedback.
All reactions