December 1999
Beginner
528 pages
11h 10m
English
Using cut you extract columns or fields of data from a text file or standard input. With paste you can then use this data to paste the contents of the file together. When pasting data from two different sources, it pays to sort them first; you should also make sure that the two files have an equal number of lines.
Paste puts the text together in a row by row method. By default, when paste joins, it converts all the new lines into tabs or spaces unless the ‘ -d ’ option is specified, then this will become the field separator.
The format for paste is:
paste -d -s - file1 file2
Let’s look at the options.
| -d | Tells paste to use a different field delimiter, rather then a tab or space; for example, to separate the fields using an ... |
Read now
Unlock full access