Yes sorry, I'd forgotten about the limitation of cut keeping the original field order (it's fast though!).
Given you need to do a bit of processing as well I think the post by Kenosis should get you well on the way.
In reply to Re^3: selecting columns from a tab-separated-values file
by mildside
in thread selecting columns from a tab-separated-values file
by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |