2015-12-30 03:41:32 +00:00
|
|
|
# paste
|
|
|
|
|
|
|
|
> Merge lines of files.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/paste>.
|
2015-12-30 03:41:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Join all the lines into a single line, using TAB as delimiter:
|
2015-12-30 03:41:32 +00:00
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`paste -s {{path/to/file}}`
|
2015-12-30 03:41:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Join all the lines into a single line, using the specified delimiter:
|
2015-12-30 03:41:32 +00:00
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`paste -s -d {{delimiter}} {{path/to/file}}`
|
2015-12-30 03:41:32 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Merge two files side by side, each in its column, using TAB as delimiter:
|
2015-12-30 03:41:32 +00:00
|
|
|
|
|
|
|
`paste {{file1}} {{file2}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Merge two files side by side, each in its column, using the specified delimiter:
|
2015-12-30 03:41:32 +00:00
|
|
|
|
|
|
|
`paste -d {{delimiter}} {{file1}} {{file2}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Merge two files, with lines added alternatively:
|
2015-12-30 03:41:32 +00:00
|
|
|
|
|
|
|
`paste -d '\n' {{file1}} {{file2}}`
|