Here is my file that has each line as mentioned below:
<a href="abc.com" aria-label="abc ofe" class="abc"><span class="bcd">abc</span><span class="icon"></span></a>
here is expected output:
href="abc.com"
aria-label="abc ofe"
class="abc"
class="bcd"
class="icon"
Here is what I got:
awk '{for(i=1; i<=NF; ++i)printf "%s%s", $i, (i<NFi?FS:(i<NF?"\n":RS))}'
echo "<a href="abc.com" aria-label="abc ofe" class="abc"><span class="bcd">abc</span><span class="icon"></span></a>" | awk '{for(i=1; i<=NF; ++i)printf "%s%s", $i, (i<NFi?FS:(i<NF?"\n":RS))}'
gives me:
<a
href=abc.com
aria-label=abc
ofe
class=abc><span
class=bcd>abc</span><span
class=icon></span></a>
Trying to get "attribute" string before double quote and "attribute value" string between double quote.
Need to use awk or sed for macOS.