开发者

Paste two text lists (one list a file) into one list separated by semicolon

开发者 https://www.devze.com 2022-12-08 15:40 出处:网络
An example of the process/output would be: File1: hello world File2: foo bar Resulting file after concatenation:

An example of the process/output would be:

File1:

hello
world

File2:

foo
bar

Resulting file after concatenation:

File3:

hello;foo
world;bar

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

I cannot figure开发者_Go百科 out how to do this with the paste command under Ubuntu.


paste -d';' File1 File2  >  File3


cat concatenates by lines (or, more accurately, doesn't care what the contents are).

What you seem to need is something more like paste.

$ paste -d\; file1 file2
hello;foo
world;bar
0

精彩评论

暂无评论...
验证码 换一张
取 消