Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the Linux basic command paste

Shulou Source: shulou.com Published: 2022-06-01 12:38:41 10月04日 Update

This article mainly explains the "Linux basic command paste use", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "Linux basic command paste use" bar!

Paste

Merges the specified files as columns and displays the results on the standard output device, which is equivalent to two side-by-side cat commands. The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

1. Grammar

Paste [options] files

2. List of options

Option

Description

-- help

Show help documentation

-- version

Show version

-d list |-- delimiters=list

Replace tab with the specified delimiter area

S

Merge multiple lines of the same file

3. Examples

1) merge three files

[root@localhost weijie] # cat 1.c / / display the contents of these files

1K

1M

1G

1T

[root@localhost weijie] # cat 2.c

one hundred and twenty three

twenty-three

two hundred and twelve

[root@localhost weijie] # cat 3.c

one hundred and twenty three

twenty-three

two hundred and twelve

[root@localhost weijie] # paste 1.c 2.c 3.c / / merge files

1K 123 123

1M 23 23

1G 212 212

1T

2) merge multiple lines of the same file

[root@localhost weijie] # cat 4.c

one hundred and twenty three

twenty-three

two hundred and twelve

[root@localhost weijie] # paste-s 4.c / / merge multiple lines of the same file into multiple columns

123 23 212

Thank you for your reading, the above is the content of "the use of Linux basic command paste". After the study of this article, I believe you have a deeper understanding of the use of Linux basic command paste, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Files commands usage basics methods content multiple lines learning three two delimiters examples that is ideas situations documents articles methods more standards Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Docker NVidia Microsoft Shulou Tech Info