grep -A n xxx
grep -B n xxx
grep -C n xxx
分别搜索xxx并打印后面,前面,前后制定行数的内容
转载于:https://www.cnblogs.com/fourstupidguns/p/11072058.html