whatismyip 111 B

123456
  1. #!/bin/bash
  2. ## Outputs external ipv4 in the shell
  3. echo $(dig +short myip.opendns.com @resolver1.opendns.com)