My config file looks as follows:
ver 3
file test1.conf ~/etc
file test2.conf ~/etc/conf
script tst.sh
I'd like my script to iterate through all lines prefixed with "file", extract filename and location values and execute some operation. Since now I got:
files=$(cat file.conf | grep file)
But then I'm not sure how to get into iteration to extract second and third string out of each line.
ashis POSIX Shell compatible, andbashcontains many extensions, but you might get some ideas in https://mywiki.wooledge.org/BashFAQ/001 – Bodo May 03 '22 at 15:50