`

awk命令使用

 
阅读更多

输出把一个文件中最长的行的长度(test.log是文件名

awk 'BEGIN{ max_length = 1; } { line_length=length; if(max_length < line_length) max_length = line_length; } END{ print max_length; }' test.log  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics