I want to store a value of key in a variable. i solved problem like this in linux using
var1=`cat /path/to/file1.txt | grep -i "no3" | cut -d '=' -f2`
now i want to store a key's value in variable in windows machine.
I want to store a value of key in a variable. i solved problem like this in linux using
var1=`cat /path/to/file1.txt | grep -i "no3" | cut -d '=' -f2`
now i want to store a key's value in variable in windows machine.
Same question.Though you need to escape some special characters:
for /f "usebackq tokens=* delims=" %%# in (`cat /path/to/file1.txt ^| grep -i "no3" ^| cut -d '^=' -f2`) do (
set "var1=%%#"
)