Answer the question
In order to leave comments, you need to log in
How to write a shell script that reads a text file?
You need to write a small script, well, or with one command, which should read from the "Select_the_version" file, for example:
version: "1.2"
and execute cp -r /server/1.2/* /home/User/Server/
Answer the question
In order to leave comments, you need to log in
Head-on solution:
egrep '^version:' Select_the_version | awk -F\" '{print "/server/"$2"/*"}' | xargs -J % cp -r % /home/User/Server/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question