ArticleDirectory
- Parameters
- Option
- Example
Connect the corresponding lines of the file
Paste [Option] [File-list]
Paste reads rows from file-list, connects the corresponding rows, and outputs them. By default, the output rows are separated by tabs.
Parameters
File-listIs the file name list.File-list,PasteThe input will be retrieved from the standard input
Option
-D Dlist is a list of characters used to separate output fields. If Dlist contains only one character, paste replaces the default tab with this character to separate fields.
If a Dlist contains multiple characters, these characters are used in turn to separate output fields.
-S: processes a file at a time and connects horizontally.
Example
Original file
$CatA.txt AAAA bbbbaaaa BBBB $CatB .txt CCCC ddddcccc dddd
Paste
$ Paste a.txt B .txt AAAA BBBB CCCC ddddaaaa BBBB CCCC dddd
Lines are separated by tabs by default.
Paste-d
$ Paste-D =A.txt B .txt AAAA BBBB=CCCC ddddaaaa BBBB= CCCC dddd
Specify delimiter connection line
Paste-S
$ Paste-S a.txt B .txt AAAA BBBB AAAA bbbbcccc dddd CCCC dddd
Horizontally connected rows