Shell
iteye_20969
这个作者很懒,什么都没留下…
展开
-
Linux Shell常用技巧
Linux Shell常用技巧(一) http://www.cnblogs.com/stephen-liu74/archive/2011/11/10/2240461.html 一. 特殊文件: /dev/null和/dev/tty 二. 简单的命令跟踪 三. 正则表达式基本语法描述 四. 使用cut命令选定字段 五. 计算行数、字数以及字符数 六. 提取开头或结尾数行 Lin...原创 2013-03-11 10:32:26 · 46 阅读 · 0 评论 -
shell脚本获取网卡的实时流量
#!/bin/bash while [ "1" ] do eth=$1 RXpre=$(cat /proc/net/dev | grep $eth | tr : " " | awk '{print $2}') TXpre=$(cat /proc/net/dev | grep $eth | tr : " " | awk '{print $...原创 2013-03-13 08:29:43 · 351 阅读 · 0 评论 -
Linux/Unix下grep命令使用的几个例子
[size=medium]grep 语法 grep [color=red]'word[/color]' filename grep [color=red]'string1 string2' [/color]filename cat otherfile | grep '[color=green]something[/color]' command | grep 'something' c...原创 2013-03-18 11:24:17 · 148 阅读 · 0 评论