This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to join multiple files in shell with variable lines?

Hi, I have 10 .txt files. Each of them have one column with variable lines. For example, file 1 has 92, file 2 has 103 lines. The content of one file is as below.

Aca10
AcrIC6
AcrIC7
AcrIE1
AcrIE3
AcrIE9
AcrIF1
AcrIF12
AcrIF16
AcrIF17.1

How to join 10 .txt files together to make a file with 10 row in shell? I tried conventional "join" command but didn't work for the files.

Cheers

shell

1 answer

so you want a new file with the content of each of the 10 input files on a row in the new file?

whether you want it in rows or columns, you should look into what the linux command paste can do for you

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they work. This will help future users that might find this post find the right answer.

Upvote|Bookmark|Accept

Don't forget to follow up on your previous threads - You have multiple people waiting for your input.

Please go through https://www.biostars.org/t/myposts/ and ensure all questions you asked that have answers either have accepted answers or your feedback stating why those answers are not sufficient. In the future, remember to follow up on your posts - it is bad etiquette to disappear once you get an answer.

Log in to answer this question.