Answer the question
In order to leave comments, you need to log in
How to get the content from a file and also get the content from a line in a file?
There is a command to unpack the archive, its name is formed like this (in Linux):
unzip way/archive_`cat "$GK" |grep it.version.dev |awk -F '=' {'print $2'}`_`cat "$GK" |grep who.is.cat._or_codename |awk -F '=' {'print $2'}`.zip -d /way/to/folder
`cat "$GK" |grep it.version.dev |awk -F '=' {'print $2'}`_`cat "$GK" |grep who.is.cat |awk -F '=' {'print $2'}`
it.version.dev=yes
who.is.cat=5.1.2
Answer the question
In order to leave comments, you need to log in
for /f %%L in ('findstr "^it\.version\.dev= ^who\.is\.cat=" X.txt') do set "%%L"
unzip way\archive_%it.version.dev%_%who.is.cat%.zip -d \way\to\folder
findstr
are searched in the X.txt file and are used in the command (more precisely, part of the line before the first space or tab character, if they are in the found line , but this, if necessary, is easy to change): the part of the line before becomes the name of the environment variable, and the part after becomes its value. it.version.dev=
who.is.cat=
set
=
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question