- 论坛徽章:
- 33
|
grep $todayf access_$yesterday.log |wc -l
--->- grep -c $todayf access_$yesterday.log
复制代码 ifconfig eth0|grep "inet addr" |cut -f 2 -d ":" | cut -f 1 -d " "
--->- ifconfig | sed -n '/eth0/{N;s/.*inet addr://;s/ .*//p}'
复制代码- ifconfig | awk '/eth0/{getline;gsub(/addr:/,"",$2);print $2}'
复制代码- ifconfig eth0 | sed '/inet addr/!d; s/.*inet addr://; s/ .*//'
复制代码- ifconfig eth0 | awk -F '[: ]+' '/inet addr/{print $4}'
复制代码- ifconfig eth0 | awk '/inet addr/{gsub(/addr:/,"",$2);print $2}'
复制代码- ip r | awk 'NR==1{print $NF}'
复制代码 |
|