grep -A -B详解
·
1 分钟阅读
·
Shell
grep -A -B详解
grep -A10 "colume" file 显示关键字和之后的10行
grep -B10 "colume" file 显示关键字和之前的10行
grep -10 "colume" file 显示关键行和前后各10行
相关文章
-
2015年03月07日 12:47:41 巧克力腹肌 阅读数:13150 更多 个人分类: shell tips 版权声明:本文为博主原创文章,未经博主允许不得转载。
Shell · 1 分钟阅读
-
#!/bin/bash PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export PATH function trafficmonitor { OSNAME=$(sed -n '1p' /etc/issue) eth=$1
Shell · 3 分钟阅读
-
转载 2017-09-30 作者:丁丁历险 的BLOG 我要评论 这篇文章主要介绍了Shell脚本生成随机密码的若干种可能,需要的朋友可以参考下 1.生成随机密码(urandom版本) < /dev/urandom tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 10
Shell · 3 分钟阅读
-
博客分类: Bash Shell shell 比较浮点数 由于程序需要,我要判断一个浮点数是否大于另一个浮点数。
Shell · 2 分钟阅读