Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

use shell command merge two files with differnt columns into new files I want to

ID: 3599347 • Letter: U

Question

use shell command

merge two files with differnt columns into new files

I want to merge two files with same number of colums and rows.

The first file has 200 columns and rows and second file has 200 columns and rows

For example:

File 1

Name,id,ssn,add,………,colum200

File2

Name,id,ssn,add,………,colum200

I want the output save in txt file3 should be as below then remove header file so number of rows will be 200 and number of coulmns400

Name,id,ssn,add,………,colum200, Name,id,ssn,add,………,colum200

I tried different command in shell but it will save the whole data from file 1 and then insert whole data from file2 and number of rows be like 400 and I don’t want to do like that. the number of rows should be same in file1 and file 2 which is 200

paste cancer1.txt cancer2.txt | column -s $' ' –t >cancer3.txt

Explanation / Answer

Please use the following command to accomplish the task: paste cancer1.txt cancer2.txt | column -s $' ' -tn > output.txt