I have multiple files with multiple links that are formatted like this:
<a href="http://example.com/fnord.layername.html?parameter=FOO-_-BAR-_-FNORD" class="poit">
<img ... />
</a>
Bear in mind that FOO, BAR and FNORD can differ.
Now I want to make sure that all those files have the correct attributes set. For that purpose I want to use ack-grep and cut.
ack-grep -a ?parameter= *.txt
gettiting the output:
fileName.txt
1:<a href="http://example.com/fnord.layername.html?parameter=FOO-_-BAR-_-FNORD" class="poit">
fileName2.txt
5:<a href="http://example.com/fnord.layername.html?parameter=POIT-_-NARF-_-BAZINGA" class="poit">
Yet I am at a total lost about how I could cut the output so that I would only see:
fileName.txt
parameter=FOO-_-BAR-_-FNORD
fileName2.txt
parameter=POIT-_-NARF-_-BAZINGA