8

Let's assume that I've got two text file a, b.

$cat a
a a
a a
a a

$cat b
b b
b b
b b

Then, I want to merge these two file vertically by using paste. The merged file is shown bellow

a a
a a
a a
b b
b b
b b

NOT

$paste a b > AB
$cat AB
a a b b
a a b b
a a b b
comphys
  • 319

1 Answers1

6

Just cat a.txt b.txt > out.txt. If you want even spaces and no blank lines

$ awk 'NF' inputA.txt inputB.txt                           
a a
a a
a a
b b
b b
b b