I have to write a script to compare headers of two file.
1st_file
col1,col2,col3,col4,col5
2nd_file
col6,col1,col7,col8,col9
i have to compare the 2nd file with 1st and if the columns match i.e. col1 from 1st file is present in 2nd file then the output should show the entire 2nd column of 2nd file.