0

So I have a bunch of tab deliminated files. The first column in every file is identical, the second column varies by sample. What I want to do is cut the second column from every file and paste them together to get one big tab delimited file with a column for each individual sample. So I've done this for a small number of files using...

cut -f 2 file2 | paste file1 - > file3 

But doing this for multiple samples is so tedious.

Anyone got any suggestions? I can't figure this one out.

Thanks!

TheFoxx
  • 1,583
  • 6
  • 21
  • 28
  • 2
    With two files you can directly use `join f1 f2`. Also I see this question looks quite similar to [Merge multiple files by common field - Unix](http://stackoverflow.com/questions/13710876/merge-multiple-files-by-common-field-unix). If so, we can mark as duplicated. – fedorqui Aug 28 '14 at 10:50
  • For all your cut+paste multi-file needs you may want to look at `cuts` http://arielf.github.io/cuts/ See for example: http://stackoverflow.com/a/24543432/1296044 – arielf Aug 28 '14 at 13:50

0 Answers0