소스 검색

Adding get_ip.sh

LabbKey 1 년 전
부모
커밋
7d2a01ad02
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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%/.*$%%'