Explorar o código

Adding get_ip.sh

LabbKey hai 1 ano
pai
achega
7d2a01ad02
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      serviceScripts/get_ip.sh

+ 5 - 0
serviceScripts/get_ip.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+
+IP=$(ip add show | grep -A 1 eth | sed -n 's/^.*inet \([^ ]*\) .*$/\1/p');
+
+echo $IP | sed 's%/.*$%%'