User Tools

Site Tools


daily_regular_expression

Daily Regular Expresssion

Grab IP

egrep '([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}'
grep '^[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}$'
cat textfile | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
/sbin/ifconfig | grep "inet addr" | awk -F : '{print $2}' | awk '{print $1}' | grep -v -e '^192.\|^127.\|^10.'
daily_regular_expression.txt · Last modified: 2011/07/12 14:28 by k2patel