输出一个文件:
cat file1
输出多个文件:
cat file1 file2
输出文件内容,显示行号:
cat -n song.txt
1 "Heal The World"
2 There's A Place In
3 Your Heart
4 And I Know That It Is Love
5 And This Place Could
行尾和空行显示 $:
cat -e test
hello everyone, how do you do?$
$
Hey, am fine.$
How's your training going on?$
$
新建空文件:
cat /dev/null > file
将文件复制到新文件:
cat file1 > file2
将文件复制添加到文件末尾:
cat file1 >> file2
将多个文件合并到一个文件:
cat file1 file2 file3 > file_new
cat file* > file_new
]]>