The paste
command merges each file by columns in a column-by-column manner.
paste [OPTION]... [FILE]...
-d, --delimiters=[LIST]
: ReplaceTAB
characters with the specified delimiter characters.-s, --serial
: Paste one file at a time instead of in parallel.-z, --zero-terminated
: The line delimiter isNUL
instead of newline.--help
: Display this help and exit.--version
: Output version information and exit.
Merge the /tmp/file1.txt
and /tmp/file2.txt
files by columns.
paste /tmp/file1.txt /tmp/file2.txt
Merge the /tmp/file1.txt
and /tmp/file2.txt
files by columns and append to /tmp/file3.txt
.
paste /tmp/file1.txt /tmp/file2.txt >> /tmp/file3.txt
Merge the /tmp/file1.txt
and /tmp/file2.txt
files by columns and specify the delimiter as -
.
paste -d - /tmp/file1.txt /tmp/file2.txt
https://github.com/WindrunnerMax/EveryDay
https://www.howtoforge.com/linux-paste-command/
https://www.runoob.com/linux/linux-comm-paste.html
https://www.tutorialspoint.com/unix_commands/paste.htm