Electronics Programming
Linux Posts, Programming Posts, Atmega Posts and others.
Search This Blog
Thursday, January 29, 2009
एक्स्त्रक्टिंग IP address from ifconfig
ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | cut -d":" -f2
ifconfig eth0 | sed -n 's/.*inet addr:\([0-9.]*\).*/\1/p'
command get_def_addr will return ip address
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment