ssh - Extract file name from file and insert it as column -


i have weird requirement, have files placed in folder,

t_h_edcga.csv
c1 c2 c3 1 2 3 4 5 6

t_h_edcoa.csv c1 c2 c3 7 8 9 10 11 13

i append contents of above files, want last part of file name ie edcga , edcoa column names

result : t_h_edcga.csv c1 c2 c3 c4
1 2 3 edcga
4 5 6 edcga

t_h_edcoa.csv c1 c2 c3 c4 7 8 9 edcoa
10 11 13 edcoa

final result 1 2 3 edcga 4 5 6 edcga 7 8 9 edcoa 10 11 13 edcoa

thanks


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -