在Linux中,如何截断命令行输出?
如果我grep -nr sumthin *在源代码目录中,它还会从缩小的JavaScript或CSS文件中弹出很长的行。我想每行只获取前80个字符。 例如,一个普通的grep给我这个: css/style.css:21: behavior: url("css/iepngfix.htc") css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom:10px;z-index:13;}.arrow2{cursor:pointer;position:absolute;right:5px;bottom:10px;z-index:13;}.calendarModule{z-index:100;}.calendarFooterContainer{height:25px;text-align:center;width:100%!important;z-index:15;position:relative;font-size:15px!important;padding:-2px 0 3px 0;clear:both!important;border-left:1px solid #CCC;border-right:1px ... etc. 但我想得到的只是这个: css/style.css:21: behavior: url("css/iepngfix.htc") css/style-min.css:4:.arrow1{cursor:pointer;position:absolute;left:5px;bottom: 什么Linux命令可以做到这一点?