DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Danny has posted 1 posts at DZone. View Full User Profile

get ip for linux OS

07.02.2012
| 5658 views |
  • submit to reddit
#!/bin/sh

ifconfig |sed -n '2p'|awk -F: '{print $2}'|awk '{print $1}'