Skip to content

Instantly share code, notes, and snippets.

@rmccullagh
Created March 25, 2015 17:52
Show Gist options
  • Select an option

  • Save rmccullagh/24dceeaf8f51cf418978 to your computer and use it in GitHub Desktop.

Select an option

Save rmccullagh/24dceeaf8f51cf418978 to your computer and use it in GitHub Desktop.
ifconfig eth0 | grep -P '[0-9].[0-9].[0-9].[0-9]$' | awk '{ print $2 }' | awk '{split($0,a,":"); print a[2]}'
@rmccullagh

Copy link
Copy Markdown
Author

get the ip address of eth0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment