shell 之 grep 控制显示关键字的 上下行数和不区分大小写
2016-04-26 09:04
369 查看
grep -C 5 foo file 显示file文件里匹配foo字串那行以及上下5行
grep -B 5 foo file 显示foo及前5行
grep -A 5 foo file 显示foo及后5行
grep -i 加上 -i 就表示不区分大小写
/article/6959932.html
grep -B 5 foo file 显示foo及前5行
grep -A 5 foo file 显示foo及后5行
grep -i 加上 -i 就表示不区分大小写
/article/6959932.html
相关文章推荐
- HoloLens开发手记 - HoloLens shell概述 HoloLens shell overview
- shell除法保留两位小数
- shell命令练习 20160425
- Linux Bash expect 登录远程主机执行命令
- Linux Shell 01 脚本与变量
- Shell 脚本知识回顾 (二) —— Shell变量
- Shell 脚本知识回顾 (一) —— 基础篇
- Linux下shell颜色配置
- shell编程
- Xshell 4 入门
- linux shell
- Python与shell的3种交互方式介绍
- linux bash shell之declare
- 九.Shell基础
- 51nod1066bash游戏
- python和shell变量互相传递的几种方法
- Bash on Ubuntu on Windows ^_^
- shell命令获取tomcat的进程号id
- linux下Bash函数功能之编写脚本(十一)
- Java调用shell