Hi,
I'm trying to write a shell script that searches in a file specified as argument $1 for a regex and writes the found subpattern into a variable I can then use.
let's say my script is called 'dosth.sh' and I have a file 'plot.gp' with the line
set output 'test.tex'
If I now execute 'dosth.sh plot.gp' the script should extract 'test.tex' from plot.gp and write it to a variable.
How is that possible with grep or others?
Thanks and regards, Jan Oliver