1: 查找文件中关键字所在行数信息
grep -n "关键字" filePath
2:截取指定行之间的内容到新文件中
sed -n '开始行数,结束行数p' filePath >> newFilePath
sed -n '700,1250p' file.log >> newOut.log
1: 查找文件中关键字所在行数信息
grep -n "关键字" filePath
2:截取指定行之间的内容到新文件中
sed -n '开始行数,结束行数p' filePath >> newFilePath
sed -n '700,1250p' file.log >> newOut.log