I have multiple files (>150) with multiple columns (>150). Most of the headers are common but occur in different order (as eg below):
Col1 Col2 Col3 Col4 Col5 A B C D E
Col1 Col4 Col3 Col5 P Q R S
Col1 Col3 Col4 Col5 A C D E P R Q S
Alternatively, nearly 30-40 files have common set of headers (still in different order though). If someone can help me sort the headers (and the corresponding data) so that they appear in the same order in the whole bunch of files, I can then go ahead and remove uncommon columns from 4-5 bunches and merge the common set.