GET YOUR IP ADDRESS
For Solaris use:
ifconfig -a | grep “inet” | grep -v “127.0.0.1″ | awk ‘{print $2;}’
Sample
-bash-3.00$ /sbin/ifconfig -a | grep “inet” | grep -v “127.0.0.1″ | awk ‘{print $2;}’
10.221.224.55
For HP-UX use:
ifconfig foo | grep “inet” | awk ‘{print $2;}’
Where foo is the interface, generally lan0, lan1 etc.
- Unix tips at UGU
No comments yet
Jump to comment form | comments rss [?] | trackback uri [?]