Parse WMIC output to set returned value as a variable (windows batch)
问题 I have the following command: c:\wmic baseboard get Manufacturer Manufacturer ASUSTeK Computer INC. I'd like to save it's output into variable and process some way like I did it with bash here: esxi_hwinfo.sh @ GitHub e.g.: remove some sub-strings, shorten numbers, convert one string to another etc. Is it possible to iterate over lines inside variable and get for instance the second one? Examples which I've seen work only with files ( for /f "delims=" %%1 in ('type !foo!') do ). If I use