Skip to content

Instantly share code, notes, and snippets.

@gojimmypi
Created March 14, 2021 17:14
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 gojimmypi/dc4375955053eb624ef6a6761023fa19 to your computer and use it in GitHub Desktop.
Save gojimmypi/dc4375955053eb624ef6a6761023fa19 to your computer and use it in GitHub Desktop.
commandline ipchicken cli what's my IP address
#!/bin/bash
# thanks stackoverflow for sed tip: https://stackoverflow.com/questions/19878056/sed-remove-tags-from-html-file/19878198
curl -v --silent https://www.ipchicken.com 2>&1 | grep -A 1 "Address:" \
| sed -e 's/<[^>]*>//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment