Linux tee command

Source: Internet
Author: User


Linux tee command-specific application of the tee command: tee Function Description: Read standard input data and output its content into a file. Syntax: tee [-ai] [-- help] [-- version] [file…] Note: The tee command reads data from the standard input device, outputs the data to the standard output device, and saves it as a file. We can use tee to save the data imported from the pipeline into a file, or even several files at a time. Parameter:-a is appended to an existing file, rather than overwriting it. If the file name given the tee instruction already exists, the content of the file will be overwritten by default. After this parameter is added, the data is added at the end of the file content, and the original content is not deleted. Www.2cto.com-I ignore the interrupt signal -- help Online help -- version display version information instance: grade.txt content: M. tans 5/99 48311 Green 8 40 44 J. lulu 06/99 48317 green 9 24 26 P. bunny 02/99 48 Yellow 12 35 28 J. troll 07/99 4842 Brown-3 12 26 26 L. tansl 05/99 4712 Brown-2 12 30 28 command: [tym @ lxy awk] $ awk '{print $0} 'grade.txt | tee outputM. tans 5/99 48311 Green 8 40 44 J. lulu 06/99 48317 green 9 24 26 P. bunny 02/99 48 Yellow 12 35 28 www.2cto.com J. troll 07/99 4842 Brown-3 12 26 26 L. tansl 05/99 4712 Brown-2 12 30 28 [tym @ lxy awk] $ vi output M. tans 5/99 48311 Green 8 40 44 J. lulu 06/99 48317 green 9 24 26 P. bunny 02/99 48 Yellow 12 35 28 J. troll 07/99 4842 Brown-3 12 26 26 L. tansl 05/99 4712 Brown-2 12 30 28 author yunmingtan

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.