I have a file of data with | as delimiter like this with multiple same delimited rows. Here is example of 3 rows:
LOW|||IregularFeature|ENS0111548|promotor||||||||||rs4564187963|
HIGH|||IregularityFeature|ENS0dse58|exon||||||||||rs456456187992|
MODIFIER|||Iregular|ENS0111548|promotor||||||||||rs4564187963|
I wanted the data extract all data with awk into columns tab separated format (every space between fields below is a tab character):
LOW IregularFeature ENS0111548 promotor rs4564187963
HIGH IregularityFeature ENS0dse58 exon rs456456187992
MODIFIER Iregular ENS0111548 promotor rs4564187963
I tried to set delimiter in output to tab and with if conditional and for loop pick up the data:
awk 'BEGIN{FS="|",OFS="\t"}; for(i = $1; i <= $NF; i ++);if(i!= ""){print i}'