Insert two text lists (one list of files) into one list, separated by a semicolon

An example of a process / output would be:

File1:

hello world 

File2:

 foo bar 

The resulting file after concatenation:

file3:

 hello;foo world;bar 

For a large list of non-predictive text (diskless cards, but lines are aligned as above).

I cannot figure out how to do this with the paste command in Ubuntu.

+4
source share
2 answers
 paste -d';' File1 File2 > File3 
+7
source

cat concatenates strings (or rather, doesn't care what the contents are).

What you think is more like paste .

 $ paste -d\; file1 file2 hello;foo world;bar 
+4
source

All Articles