为什么80%的码农都做不了架构师?>>>
cat -n 文件名|grep '关键字'|awk '{print $1}'
cat -n是获取行号,要是获取行内容,去掉-n就可以了。
转载于:https://my.oschina.net/bobwei/blog/1823639