I have table in the current format:
Lead:Arrow1:Arrow2:Arrow3
Follow:Arrow4:Arrow5:Arrow6:Arrow7:Arrow8:Arrow9
I want to turn this to the
Lead
Arrow1
Arrow2
Arrow3
Follow
Arrow4
Arrow5
Arrow6
Arrow7
Arrow8
Arrow9
I tried awk:
$(awk -F":" '/Lead/ {print NF-1}' $f)
$(awk -F":" '/Follow/ {print NF-1}' $f)
but it didn't work. How can I do it in awk or any other method?