How to join multiple files in shell with variable lines?
1
0
Entering edit mode
3.5 years ago

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 • 747 views
ADD COMMENT
0
Entering edit mode
3.5 years ago

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

ADD COMMENT
0
Entering edit mode

Thanks..served my purpose.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 3373 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6