I am trying to write a bash script to get all IP addresses on a server. The script should work on all major distros. Here is what I have:
bash
ifconf
ifconfig | grep 'inet addr:' | awk {'print $2'} | cut -d ":" -f 2