Combine two files column-wise in Ubuntu?

Posted on

Problem :

I have two files: one is like

preface
Introduction
chapter 1

the other is like

1
2
3

I was wondering how to column-wise combine the two files into one:

preface 1
Introduction 2
chapter 1 3

by using some utilities, such as awk, sed, available in Ubuntu?

Thanks and regards!

Solution :

paste fileone filetwo

Use -d to specify delimiter.

Leave a Reply

Your email address will not be published. Required fields are marked *