The usage of the Linux basic command paste
This article mainly explains "the usage of the Linux basic command paste". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the usage of the basic Linux command paste.
Paste
The files are merged in lines, separated by tab characters, and the results are sent to standard output.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Paste [options] file
2. List of options
Option
Description
-- version
Display command version information
-- help
Show help documentation
-d |-- delimiters=LIST
Specify interval character
-s |-- serial
Sequential merging of multiple lines of a file to one line
3. Examples
1) merge files sequentially, using the spacer ";"
[root@192 weijie] # cat 1.c / / View content
Hello world
I am david
Love linux
This code
Nihao ed
[root@192 weijie] # paste-d ";"-s 1.c / / merge multiple lines of a file into one line using semicolons as intervals
Hello world;i am david;love linux;this code;nihao ed
2) merge two files
[root@192 weijie] # paste 1.c 2.c / / merge two files. The default spacer is tab.
Hello world hello linux
I am david i am weijie
Love linux love world
This code hehe
Nihao ed im join
At this point, I believe you have a deeper understanding of "the use of the Linux basic command paste". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!