linux打开文件含某字符的前后10行

2024-11-04 13:23:59
推荐回答(2个)
回答1:

grep -10 'pattern' inputfile
打印匹配行的前后10行
pattern是关键字,inputfile是文件名

回答2:

head -10
tail -10