➜ ~ cat test.txt This is firt line! This is second line! This is third line! This is fourth line!
将test.txt的内容输入到test01.txt中
1 2 3 4 5 6
➜ ~ cat test.txt > test01.txt ➜ ~ cat test01.txt This is firt line! This is second line! This is third line! This is fourth line!
带行号输出
1 2 3 4 5
➜ ~ cat -n test.txt 1 This is firt line! 2 This is second line! 3 This is third line! 4 This is fourth line!
将两个文件内容合并,再写入到第三个文件中
1 2 3 4 5 6 7 8 9 10
➜ ~ cat test.txt test01.txt >> test02.txt ➜ ~ cat test02.txt This is firt line! This is second line! This is third line! This is fourth line! This is firt line! This is second line! This is third line! This is fourth line!