Linux Basics IX

Source: Internet
Author: User

1. File descriptor     input: standard input  stdin,0    output: standard output  stdout,1              standard error  stderr,2     &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;2.I/O redirection      Input redirection  <     <<  Create files Here, commonly used in bash to create files or build menus     cat /tmp/a.txt <<  EOF        a:ls /etc/passwd         b:ls /etc/default/useradd    eof    3. Output redirection  >  >>    > Overwrite output     >> append output      4.set -C  prohibit overrides redirect to existing file   set +C  close-C attribute   >1  in set &NBSP;-C, force the use of overwrite redirection   /dev/null :bit bucket, bit bucket   5. Error redirection  2> ,2> >    2>  overlay     2>>  append     6. Simultaneous redirection of standard output and error output      command > /path/to/outfile 2> /path/to/outfile    command  & > /path/to/outfile    command > /path/to/outfile  2>&1  7. Pipe      Output two times results     cat /etc/rc.d/ Arithmetic operations in the Rc.sysinit |tee /tmp/a.out |wc -l    8.bash      declare        -i: Shaping Variables         &NBSP;-X: Environment Variables                   let varname= arithmetic expression   9.bash cannot perform floating-point operations, the result is rounded       varname=$[ Arithmetic Expression]      varname=$ ((arithmetic expression))       varname= ' expr   $num 1+ $num 2 '

Linux Basics IX

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.