Display current IP address
I would like to have a shell script that can display the user IP address , I think it is similiar to "who -m | awk -F: '{ print $6}'" , this script is used to display what IP is when the user run the program . thx in advance.
|
How about this?
Code:
/sbin/ifconfig | grep "inet addr" | awk '{print $2}' |
Or "hostname -i".
|
All times are GMT -5. The time now is 10:29 AM. |