I am trying to extract a value from a long string that may change over time. So for example the string could look something like this
And what I want to extract is the value between filename- and .tar.gz, essentially the file version (188.8.131.52 in this case). The reason I need to do it this way is because I may later run the command and the value will be 184.108.40.206 or 220.127.116.11 or something entirely different.
How can I do this? I'm currently only using grep, but I wouldn't mind using other utilities such as sed or awk or cut or whatever. To be perfectly clear, I need to extract only the file version part of the string, since it is very long (on both sides) everything else needs to be cut out somehow.