How to paste multiple files in parallel?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How to paste multiple files in parallel?
# 8  
Old 03-29-2019
There you are - DOS line terminators (<CR> = \r = ^M = 0x0D). Those cause the combined lines to wrap back to the left margin for every column. The idiosyncratic output seen in post #3 comes from the <TAB> following the <CR> shifting all consecutive output to the first <TAB> position, overwriting files 2 till n-1, and leaving the final filen column. For a proof, try with longer column elements, or with a different paste delimiter (-d option).


Remove the <CR> chars with e.g. the dos2unix command, or sed 's/\o015//'.
These 2 Users Gave Thanks to RudiC For This Post:
# 9  
Old 03-29-2019
It worked! Amazing! Thank you guys very much!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to copy particular files from a multiple directories and paste in a new directory?

Dear all I have a multiple directories, say for example org1, org2, org3 ..... org100 and each directory having a file namely dnaG.fasta. I need to copy all the dnaG.fasta file from each directory and paste in another directory fastconcatg. Therefore, my script has to copy dnaG.fasta file from... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies

2. UNIX for Beginners Questions & Answers

How to copy a column of multiple files and paste into new excel file (next to column)?

I have data of an excel files as given below, file1 org1_1 1 1 2.5 100 org1_2 1 2 5.5 98 org1_3 1 3 7.2 88 file2 org2_1 1 1 2.5 100 org2_2 1 2 5.5 56 org2_3 1 3 7.2 70 I have multiple excel files as above shown. I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Discussion started by: dineshkumarsrk
26 Replies

3. Shell Programming and Scripting

Paste columns based on common column: multiple files

Hi all, I've multiple files. In this case 5. Space separated columns. Each file has 12 columns. Each file has 300-400K lines. I want to get the output such that if a value in column 2 is present in all the files then get all the columns of that value and print it side by side. Desired output... (15 Replies)
Discussion started by: genome
15 Replies

4. Shell Programming and Scripting

Executing Multiple Queries in parallel in Shell

I have n number of SQL queries needs to executed in Shell. Result of this query need to assign in a variable. Once all the queries are executed script needs to exit. Sample Query: SQL 1: Select Count(*) from TABLE GROUP BY COL1,COL2 SQL 2: Select Count(*) from TABLE GROUP BY COL1,COL2 ... (2 Replies)
Discussion started by: Niranjancse
2 Replies

5. Shell Programming and Scripting

Paste multiple files, but only the sorted head -50

Hello, I want to merge multiple files (under hundreds folders) side by side. File name are the same but folder are different. like folder1/same_name.txt folder2/same_name.txt folder3/same_name.txt ......Normally it can be done as paste /different_path*/same_name.txt > merged_file.txtbut... (2 Replies)
Discussion started by: yifangt
2 Replies

6. Shell Programming and Scripting

Multiple child running parallel

Hi , I am using sun Solaris machine. The machine description is given below SunOS ptxsa021 5.9 Generic_118558-24 sun4u sparc SUNW,Sun-Fire-15000 I am using korn shell.the scripts is below Parent code is given below..it is the part of code #!/bin/ksh # Script Name:... (3 Replies)
Discussion started by: ashutosh2378
3 Replies

7. Shell Programming and Scripting

scp or rsync multiple files in parallel from a remote host

Hi. I'm trying to speed up an rsync command by running it in parallel. There's no real option for this other than if the files are in multiple directories (which they're not). And even then there's no way of knowing if rsync has succeeded as the process is running in the background .. and... (4 Replies)
Discussion started by: Big_Jeffrey
4 Replies

8. Shell Programming and Scripting

Calling multiple functions in parallel

Hello, I have multiple functions within a shell script. eg. function_database_backup, unix_tar_creation, etc. I would like to run these functions in parallel, as each is independent of the other. If these were simple commands, I could have probably run each of the commands in background. ... (1 Reply)
Discussion started by: neil.k
1 Replies

9. Shell Programming and Scripting

Need to run same script multiple times in parallel

Hi all, I have a requirement in which a script invokes a Java program. Lets say script ABC invokes a java program with cfg file a parameter. This script takes 10 minutes to execute . Like this ineed to run the program 10 times meaning 100 minutes if i do it sequentially. If i open... (2 Replies)
Discussion started by: rahman_riyaz
2 Replies

10. High Performance Computing

Parallel Execution on Multiple System

Hi All, I am working on a project where I need to execute set of arguments (around 500) on a Simulator. If I execute this on one linux (RedHat 8.0) machine it will approximately takes 2~3 days. Since I am having more linux machines am thinking of executing these on different machines in... (7 Replies)
Discussion started by: 123an
7 Replies
Login or Register to Ask a Question