Introduction and use of paste commands in AIX

Source: Internet
Author: User


Introduction to the paste command under AIX and the usage of the [plain] www.2cto.com paste command cut command to cut the data from the text, and then paste the data into the corresponding text using the paste command. Note: When pasting data from two different sources, you must first classify the data and ensure that the number of lines of the two files is the same. Command Format: paste-d-s-file1 file2-d: specify a domain separator different from the space or tab key, such as #,-d #-s: merge each file in rows instead of by line-: use standard input, such as passing data through pipeline commands. Cut the data from the above file and write it into the corresponding file. Cut-d:-f 1 pers.txt> pas1.txt cut-d:-f 3 pers.txt> pas2.txt pg pas1.txt R. jone S. round L. clip pg pas2.txt ID897 ID666 ID982 paste the data of these two files together: paste pas1.txt pas2.txt R. jone ID897 S. round ID666 L. the order of Clip ID982 files affects the pasting result: paste pas2.txt pas1.txt ID897 R. jone ID666 S. round ID982 L. clip specifies the separator for the pasted data: paste-d # pas1.txt pas2.txt R. jone # ID897 S. round # ID666 L. clip # ID982 merge the two files into rows and separate them with @: paste-s-d @ pas1.txt pas2.txt R.Jone@S.Round @ L. clip ID897 @ ID666 @ ID982 view the files in the current directory and display the data in the form of four files (fields) per line. Use @ as the separator: ls | paste-d @--copyright.txt@iplist.txt@names.txt@parts.txt pas1.txt@pas2.txt@pers.txt@town.txt video.txt@video2.txt@week.txt @ -- the end --
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.