linux命令---查找文件中的内容 [yang@localhost ~]$ cat 1.txt |egrep '123456789|second'-------匹配123456789或者second的行 first line:123456789012345678901234567890123456789012345678901234567890 second line:one two three four five six seven eight nine ten [yang@localh
例子如下,存在test1.txt, test2.txt, test3.txt,现在准备把这三个文件的内容都追加到testall.txt 中 test1.txt 1 2 3 4 5 6 test2.txt a b c e f g test3.txt 59 9 6 z c b 则可以使用命令:cat test1.txt test2.txt test3.txt > testall.txt, 生成如下文件: testall.txt 1 2 3 4 5 6 a b c e f g 59 9 6 z c b