moth/pollster/get_ip.sh

5 lines
85 B
Bash
Executable File

#!/bin/sh
ifconfig $1 | grep "inet addr" | awk '{print $2}' | awk -F: '{print $2}'