Detailed Linux output file contents of Rev and TAC command to use

Source: Internet
Author: User
Tags regular expression

Rev

Rev Displays the last character displayed to the first character.

Cases:

The code is as follows:

[Root@localhost www]# Cat Test

1234

Abcd

[Root@localhost www]# Rev Test

4321

Dcba

[Root@localhost www]# TAC Test

Abcd

1234

Tac

Usage: TAC [options] ... [File] ...

Each specified file is inverted by line and written to standard output.

If you do not specify a file, or if the file is "-", the data is read from standard input.

Parameters that must be used for long options are also required for short options.

-B,--before add a separator flag before and after a row

-R,--regex the delimited flag as a regular expression to parse

-S, the--separator= string uses the specified string instead of a newline as the separator flag

--HELP displays this help information and exits

--version display version information and exit

Cases:

The code is as follows:

[Root@localhost www]# Cat Test

1234

Abcd

[Root@localhost www]# Rev Test

4321

Dcba

[Root@localhost www]# TAC Test

Abcd

1234

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.