BIPEDU

my ideas in action

put content from multiple files as columns on one single file

So I have many file that contain data on one column . Like: file1.csv

45

55

67

…..

and other file file2.csv that contain :

89

99

101

…..

And I want to obtain another file that contain:

45    89

55    99

67   101

…..

Solution:

paste file1.csv file2.csv > outfile.csv

see “man paste” for other options. By default it is adding a TAB character between each column.

To use all the files from a folder you can use

paste file* > outfile.csv

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: