日志文件,查看sortType的参数 先替换前边的字符 sortType/sortType/g' ttt.txt 再替换后边的字符sed 's/,user.*//g' a.txt 然后就可以使用awk来统计了 相关文章: