Created
January 8, 2016 03:44
-
-
Save bubakazouba/72e7827eb512ec0aeeb8 to your computer and use it in GitHub Desktop.
a small script that copies your local ip to clipboard and shows it in a notification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias getlocalip="bash ~/.getlocalipscript.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP=`ifconfig | grep 'inet ' | grep -v 127.0.0.1 | awk '{print $2}'`; | |
echo $IP | tr -d '\n' | pbcopy; | |
#terminal-notifier -message "$IP" -title 'Local IP Address' #if you have terminal-notifier use this | |
osascript -e "display notification \"$IP\" with title \"Local IP Address\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment