1. Command Introduction The tac (reverse order of cat) command outputs the file contents in reverse order in lines, that is, the first line is displayed last and the last line is displayed first. The output is the opposite of the cat command. 2. Command format tac [OPTION]... [FILE]... If no file is given or file is -, standard input is read. 3. Option Description Mandatory arguments for long options are mandatory for short options as well. -b, --before Add separators at the beginning of the line instead of at the end -r, --regex Treat separator as a regular expression to parse -s, --separator=STRING Specify a string to replace the newline character as a line separator --help Display this help message and exit --version Display version information and exit 4. Common Examples Given files file1 and file2 for testing, the contents are:
file2 content:
(1) View the file contents in reverse order. tac file1 789 456 123 (2) View the file contents in reverse order, using string b as the line separator. tac -s "b" file2 c def ab (3) Connect files file1 and file2 to file3. tac file1 file2 > file3 cat file3 789 456 123 def abc References The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of MySQL sql99 syntax inner join and non-equivalent join
>>: Detailed explanation of psql database backup and recovery in docker
01 The concept of parallel replication In the mas...
<br />Previous article: Web Design Tutorial ...
Table of contents 1. The concept of process and t...
The DATE_ADD() function adds a specified time int...
How to install iso files under Linux system? Inst...
js data types Basic data types: number, string, b...
1. Font properties color, specifies the color of ...
0x0 Introduction First of all, what is a hash alg...
1. IE browser mode Hack logo 1. CSS hack logo Copy...
Maybe everyone knows that js execution will block...
The following content introduces the process and ...
1. Get the mysql image docker pull mysql:5.6 Note...
In the development process of Vue project, for th...
This article shares the specific code of vue+elem...
jQuery realizes the effect of theater seat select...