Have a look at the command line utility named cut. It can extract columns if they are separated by a unique delimiter. To recombine the parts you can use paste.
If you have, for example a typical comma-separated format
$ cat debts.csv
Name,Age,Debt
Alice,20,1337
Bob,30,42
$ cat pets.csv
Name,Pet
Alice,Dog
Bob,Cat
you could extract names and debts with
$ cut -d, -f1,3 debts.csv
Name,Debt
Alice,1337
Bob,42
and combine debts with pets using
$ cut -d, -f2 pets.csv | paste -d, debts.csv -
Name,Age,Debt,PatPet
Alice,20,1337,Dog
Bob,30,42,Cat
- With
cutandpaste,-ddetermines the delimiter for the fields, -fselects the columns to extract forcutand-directs to use the standard input (i.e. in the latterpastecase, from the pipe) instead of a file.