ipconfig.sh
·
Language/Shell Script
#!/bin/bash# (1) Host Name# (2) Connection Name# (3) Ethernet Adapter# (4) IPv4 Address# (5) Defalt Gateway# (6) DNS Servers# (0) Variavle definitionexport LANG=en_US.UTF-8TMP1=/tmp/tmp1# (1) Host NameHOST=$(hostname)echoecho "Host Name ............ : $HOST"# (2) Connection Namenmcli -f NAME connection | tail -n +2 > $TMP1for CON in $(cat $TMP1)do # (3) Ethernet Adapter NIC=$(echo $(nmcli ..