瀏覽代碼

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%/.*$%%'