Skip to content

Instantly share code, notes, and snippets.

@mjj2000
Created May 23, 2017 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjj2000/7ba644769699adb70bbc29247b429ba4 to your computer and use it in GitHub Desktop.
Save mjj2000/7ba644769699adb70bbc29247b429ba4 to your computer and use it in GitHub Desktop.
Copy local ip address to clipboard in OS X
#!/bin/bash
#
# copy local ip address to clipboard
# this script is only for OS X
echo -n `ifconfig en0 | awk '$1 == "inet" {print $2}'` | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment