4 ms·
There is also another command 'paste'. Example: Created two files (1.txt and 2.txt) [efg@fedori ~]$ cat 1.txt file1: line1 file1: line2 [efg@fedori ~]$ ca
by giis 9y ago
There is also another command 'paste'.
Example: Created two files (1.txt and 2.txt)
[efg@fedori ~]$ cat 1.txt
file1: line1
file1: line2
[efg@fedori ~]$ cat 2.txt
file2: line1
file2: line2
In order to merge the lines of these two files we can use paste:
[efg@fedori ~]$ paste 1.txt 2.txt
file1: line1 file2: line1
file1: line2 file2: line2
Also check out 'man fold'
- mynewtb 9y agoAlso super handy to turn lines into columns. 'paste - - -' for example will take every three lines as single row.