grep 'str' -B 10 -A 5 filename 这句话的意思是:在filename这个文件中查找str字符串,并显示它的前10行和后5行 转载于:https://blog.51cto.com/2820354/899670