Linux Paste Command Examples
Command: pasteCommand Usage: merge lines of filesCommand Syntax: $ paste [OPTION]... [FILE]...
Examples for Paste Command:
1. To print options and info of this command
$ paste --help
2. To paste two files f1.txt and f2.txt
$ cat f1.txt
a
b
c
$ cat f2.txt
1
2
3
$ paste f1.txt f2.txt
a 1
b 2
c 3
3. To paste two files f1.txt and f2.txt with delimiters -d and
serial -s
$ paste -s -d : f1.txt f2.txt
$ paste -s -d : f1.txt f2.txt
a:b:c
1:2:3
No comments:
Post a Comment