You're viewing a comment by Amer EZAHIR and its responses.

Amer EZAHIR Permalink
May 04, 2012, 10:06

#ifconfig eth0 | sed -n 2p | cut -d ":" -f2
172.168.1.100 Bcast

And to exclude the 'Bacast' word you add a second cut

#ifconfig eth0 | sed -n 2p | cut -d ":" -f2 | cut -d " " -f1
172.168.1.100

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "computer": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.