I want to parse a string for specific submatches and output those - one submatch per line - into a file.
Essentially I would like to extract the value of each href-attribute:
$ cat Fin <a href="a.htm">A</a>X<a href="b.htm">B</a>Y<a href="c.htm">C</a> $ echo Fin | [grep, sed, awk, ...?] > Fout $ cat Fout a.htm b.htm c.htm
I tried few things with named tools but things don't work or are too complicated. I would like to perform this transformation within a single command line concatenating as few as possible commands with piping.