hello
the input file has lines:
Code:
N750:156#x5#(none)#0#/0#0##1#100
N850:154#x5#(none)#2#/0#0##1#100
N770:152#x5#(none)#0#/0#3##1#200
N760:155#x5#(none)#0#/5#0##1#200
expected output is:
Code:
N750 0 100 N850 2 100
N770 0 200 N760 0 200
How to modify my command (to be easiest as possible and shortest - even rid off the "for" loop) to get expected output?
Code:
for i in `awk -F\# '$2 == "x5" {print $NF}' input|sort -u`;do awk -F\# -va=$i '$NF == a {print $1" "$4" "a}' input|awk 'ORS=NR%2?" ":RS';done
Now it produces:
Code:
N750:156 0 100 N850:154 2 100
N770:152 0 200 N760:155 0 200