Standard IO pipeline 033_7 for Linux Learning

Source: Internet
Author: User

Default input is keyboard, standard output is monitor, error output is monitor

REDIRECT the standard output and error output to a file:

Command operator filename

Operators

Standard output redirect

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/46/2C/wKioL1Pt9UbxBLJMAAAihwyKUF8850.jpg "title=" Clipboard1.png "alt=" Wkiol1pt9ubxbljmaaaihwykuf8850.jpg "/>: redirect the output of Ls-r to a file

2>: Error output redirection

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/46/2D/wKioL1Pt9XSyMEU-AABGEkA4GPE262.jpg "title=" Clipboard2.png "alt=" Wkiol1pt9xsymeu-aabgeka4gpe262.jpg "/>

&>: Redirect both correct and incorrect output

Both correct and error messages are imported to different files, respectively:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/46/2B/wKiom1Pt9Qfx5bccAAA3LSsstgY338.jpg "title=" Clipboard3.png "alt=" Wkiom1pt9qfx5bccaaa3lssstgy338.jpg "/>

The above default overrides, if added at the end of the file with >>s

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m00/46/2f/wkiol1publ-iusfmaaakblq9auq407.jpg "title=" Clipboard4.png "alt=" Wkiol1publ-iusfmaaakblq9auq407.jpg "/>

REDIRECT error output to an empty device, that is, ignore the error message

Pipeline:

The result of executing the previous command as input to the following command

Such as:

Ls-r |more: Pagination shows the results of Ls-r

LS |grep CLC: Search for files containing CLC

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/46/2E/wKiom1PuBVuBPaV9AAEDtbIDQr0033.jpg "style=" float: none; "title=" Clipboard5.png "alt=" Wkiom1pubvubpav9aaedtbidqr0033.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/46/2E/wKiom1PuBVuhdJ2VAAETUSVmaC0241.jpg "style=" float: none; "title=" Clipboard6.png "alt=" Wkiom1pubvuhdj2vaaetusvmac0241.jpg "/>

By default, error messages can only be output to a file and cannot be exported to the pipeline, and the output to the pipe is 2>&1

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/46/2E/wKiom1PuBW3QrZscAABiss5ANoY751.jpg "title=" Clipboard7.png "alt=" Wkiom1pubw3qrzscaabiss5anoy751.jpg "/>

Sort for sorting

By default, multiple pipelines only show the last result, tee not only outputs the intermediate results to the file, but also continues the pipeline

Enter redirection:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/46/2E/wKiom1PuBYai6e9cAAAduyydLX8118.jpg "title=" Clipboard8.png "alt=" wkiom1pubyai6e9caaaduyydlx8118.jpg "/>: Convert all uppercase letters of this file into lowercase letters and output to the screen equivalent to: 650) this.width=650;" Src= "Http://s3.51cto.com/wyfs02/M00/46/30/wKioL1PuBraxE2wvAAAeic4wZII427.jpg" title= "Clipboard9.png" alt= " Wkiol1pubraxe2wvaaaeic4wzii427.jpg "/>

>>: Redirect The results of multiple entries at once

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/46/2E/wKiom1PuBanySD7uAABZxZ3fkWE709.jpg "title=" Clipboard10.png "alt=" Wkiom1pubanysd7uaabzxz3fkwe709.jpg "/>

ABC for END keyword

Loop statement:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/46/30/wKioL1PuB2WDSRbOAAB5vkVTsoU979.jpg "title=" Clipboard11.png "alt=" Wkiol1pub2wdsrboaab5vkvtsou979.jpg "/>

Create the user and set the initial password bit password:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/46/30/wKioL1PuB3ThflYTAABXvfjBpWA607.jpg "title=" Clipboard12.png "alt=" Wkiol1pub3thflytaabxvfjbpwa607.jpg "/>

Create ADMIN1~10, and default password password

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/46/30/wKioL1PuB4OTtTPNAABYENQmmWg872.jpg "title=" Clipboard13.png "alt=" Wkiol1pub4otttpnaabyenqmmwg872.jpg "/>

Test host Connectivity:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/46/30/wKioL1PuB6qwa6DZAAB02Gd7sgI611.jpg "title=" Clipboard14.png "alt=" Wkiol1pub6qwa6dzaab02gd7sgi611.jpg "/>

PING-C2 Ping Two packets, the default is to ping all the time

$ = 0 for success, 1 for failure


This article is from the "FLYCLC" blog, make sure to keep this source http://flyclc.blog.51cto.com/1385758/1540837

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.