Tag: getip

Get external IP via bash

To get your external IP via a small bash script #!/bin/bash # Define parameters LOGFILE=”/tmp/extip.log” DATE=$(date “+%Y%m%d-%H%M”) GETIP=$(wget -q -O – checkip.dyndns.org | sed -e ‘s/[^[:digit:]|.]//g’) test -f $LOGFILE || echo “no LOGFILE” touch $LOGFILE GETLOGIP=$(tail -n 1 $LOGFILE |…