On Tue, Oct 27, 2020 at 02:06:57PM +0800, Zhang Dewan wrote:
hosts/m | 40 ++++++++++++++++++++++++++++++++++++++++ hosts/p | 10 ++++++++++ 2 files changed, 50 insertions(+) create mode 100644 hosts/m create mode 100644 hosts/p
diff --git a/hosts/m b/hosts/m new file mode 100644 index 0000000..b73dfb7 --- /dev/null +++ b/hosts/m @@ -0,0 +1,40 @@ +taishan200-2280-2s48p-256g--a11 a11 +taishan200-2280-2s48p-256g--a13 a13 +taishan200-2280-2s48p-256g--a14 a14 +taishan200-2280-2s48p-256g--a15 a15 +taishan200-2280-2s48p-256g--a17 a17 +taishan200-2280-2s48p-256g--a18 a18 +taishan200-2280-2s48p-256g--a19 a19 +taishan200-2280-2s48p-256g--a21 a21 +taishan200-2280-2s48p-256g--a22 a22 +taishan200-2280-2s48p-256g--a24 a24 +taishan200-2280-2s48p-256g--a25 a25 +taishan200-2280-2s48p-256g--a26 a26 +taishan200-2280-2s48p-256g--a27 a27 +taishan200-2280-2s48p-256g--a28 a28 +taishan200-2280-2s48p-256g--a29 a29 +taishan200-2280-2s48p-256g--a30 a30 +taishan200-2280-2s48p-256g--a31 a31 +taishan200-2280-2s48p-256g--a32 a32 +taishan200-2280-2s48p-256g--a33 a33 +taishan200-2280-2s48p-256g--a34 a34 +taishan200-2280-2s48p-256g--a52 a52 +taishan200-2280-2s48p-256g--a53 a53 +taishan200-2280-2s48p-256g--a60 a60 +taishan200-2280-2s48p-256g--a61 a61 +taishan200-2280-2s48p-256g--a62 a62 +taishan200-2280-2s48p-256g--a66 a66 +taishan200-2280-2s48p-256g--a67 a67 +taishan200-2280-2s48p-256g--a68 a68 +taishan200-2280-2s48p-256g--a69 a69 +taishan200-2280-2s48p-256g--a70 a70 +taishan200-2280-2s48p-256g--a71 a71 +taishan200-2280-2s64p-256g--a10 a10 +taishan200-2280-2s64p-256g--a3 a3 +taishan200-2280-2s64p-256g--a36 a36 +taishan200-2280-2s64p-256g--a4 a4 +taishan200-2280-2s64p-256g--a40 a40 +taishan200-2280-2s64p-256g--a41 a41 +taishan200-2280-2s64p-256g--a42 a42 +taishan200-2280-2s64p-256g--a8 a8 +taishan200-2280-2s64p-256g--a9 a9 diff --git a/hosts/p b/hosts/p new file mode 100644 index 0000000..9d47282 --- /dev/null +++ b/hosts/p @@ -0,0 +1,10 @@ +#!/bin/bash
+while read line +do
- i=$(echo $line | awk '{print $2}')
- j=$(echo $line | awk '{print $1}')
i,j 这种看不出实质性的意义的变量名称建议不要用
- ip=$(grep $i /home/dewan/servers.info | head -n 1 |awk '{print $1}')
/home/dewan/server.info 公共性文件和资源不要放到自己家目录下 Thanks sunyukui
- echo "ipmi_ip: $ip" >> $j
+done < m
2.23.0