find_docker_ip.sh 264 B

1234
  1. #!/bin/bash
  2. ip addr | grep "inet" | grep -v "127.0.0.1" | cut -d'/' -f 1 | tr -d [:alpha:]
  3. #List all IP addr info | filter out lines with addresses | grab the host part of an IPv4 address (part before '/') | remove all alphabet chars on that line - "inet" etc