Cat command merges files with Linux redirection

Source: Internet
Author: User

Take a look at the documentation:

<span style= "FONT-SIZE:18PX;" >[[email protected] documents]$ <strong>cat--help</strong> usage: cat [options] ... [File] ... Output the [file] or standard input combination to the standard output.  -A,--show-all           equals-vet-  B,--number-nonblank    to non-null output line number-  e                       equals-ve-  E,--show-ends          Show "$"-N at the end of each line  ,--number             to all lines of output-  s,--squeeze-blank      does not output multiple lines of empty lines-  t                       with-vt equivalent  -T,-- Show-tabs          the tab character as ^i-  u                       (ignored)-  V,--show-nonprinting   uses ^ and M-references, except LFD and TAB      Help displays this helpful information and exits      --version displays version information and exits if no file is specified, or if the file is "-", it is read from the standard input. Example:  cat f-g outputs the contents of  F First, then outputs the contents of the standard input, and finally outputs the contents of G.  Cat        Copies the contents of the standard input to the standard output. </span>
combine several files with commands

<span style= "FONT-SIZE:18PX;" ><strong>cat a.txt b.txt > c.txt</strong></span>
or

<span style= "FONT-SIZE:18PX;" ><strong>cat a.txt b.txt >> c.txt</strong></span>

The difference is the first to create a file or truncate a file. The second one is appended to the end of the file (the file does not exist created).

Cat command merges files with Linux redirection

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.