Skip to content

Instantly share code, notes, and snippets.

@davidraviv davidraviv/
Created Jun 9, 2014

What would you like to do?
Get a list of your ip's on macosx using ifconfig (no external service)
#! /bin/bash
ip_lines=`ifconfig | grep "inet "`
prefix="*inet "
suffix=" net*"
while read -r line; do
echo "$ip"
done <<< "$ip_lines"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.