Is it possible using awk or anything to get the following output?
key=x|y|z
value=1|2|5
I can use two separate code lines using awk or cut (with tr) to get the key and value separately, was wondering if this can be done with some awk code at a once.
If NR is defined in the END block in your variant of awk, you can replace the variable i with NR (and of course incrementing it is then done implicitly).