I have a file where all the column headers are the path names. I want to abbreviate each column header from something that looks like:
How do I do this in linux? My files have anywhere from 46 to 100+ columns so manually editing column names is not an option. My desired file names are each 7 characters in length, as above.
The header has the filename. Each column header/ name is
where I just want it to be
To clarify, this is one text file with 46 columns. Each column header or name appears as the lengthy string above and I want to truncate each header to the 7 character version, e.g. 'sample1'...'sampl46'
Desired Example file (with data under each column header)
sample1 sample2 sample3 sample4 sample5 ...