2015-12-30 03:41:32 +00:00
|
|
|
# paste
|
|
|
|
|
|
|
|
> Merge lines of files.
|
|
|
|
|
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
|
|
|
|
|
|
|
`paste -s {{file}}`
|
|
|
|
|
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
|
|
|
|
|
|
|
`paste -s -d {{delimiter}} {{file}}`
|
|
|
|
|
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}}`
|