I have more than 100 tab delimited files with seven different columns in each files. I was to get a single file with first and 7th column of first file and seventh columns of every other files. Any help will be appreciated.
file1:
A B C D E F G
gene1 6 12 3 4 0 1
gene2 8 0 2 5 10 3
gene3 9 1 1 6 11 5
gene4 10 3 0 7 2 7
file 2:
A H I J K K M
gene1 0 2 1 2 4 2
gene2 10 3 5 5 7 4
gene3 20 40 7 0 9 6
gene4 1 25 9 2 10 7
file3:
file4: so on
I want to get output like this:
A G M
gene1 1 2
gene2 3 4
gene3 5 6
gene4 7 7
Please edit your question and explain how this is related to bioinformatics. If not, the post will be closed as off-topic.
If the first column of the input files are not same, paste command will give wrong results
This comment is not an answer by itself, but a comment on an existing answer. I've moved it to a comment on the top level post.
The question clearly shows that all files share the same first column. If that were not to be the case, OP would state that.