Blogs : Latest entries
|
|
|
This took me a little bit longer that I'd hoped, I tried with awk first but finally settled on perl. Maybe this could be handy for someone else if you need to have the current IP address of eth0 isolated for shell scripting: ifconfig eth0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'
Could result into: 216.182.233.220
|


