差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
linux:shell_script [2018/10/01 15:22]
tony [sed]
linux:shell_script [2023/06/25 09:48] (目前版本)
行 15: 行 15:
   * [[.shell_script:​get_local_ip|取得IP Address]] included ipv4, ipv6 and cable status   * [[.shell_script:​get_local_ip|取得IP Address]] included ipv4, ipv6 and cable status
   * [[.shell_script:​execution_time_measurement|測量執行時間]]   * [[.shell_script:​execution_time_measurement|測量執行時間]]
 +  * [[.shell_script:​bypass_invalid_options_of_getopts|Bypass invalid options of getopts]]
 ===== 暫存區 ===== ===== 暫存區 =====
 ==== grep space ==== ==== grep space ====
行 45: 行 46:
 ifconfig | grep -o -E '​([[:​xdigit:​]]{2})(:​[[:​xdigit:​]]{2}){5}'​ ifconfig | grep -o -E '​([[:​xdigit:​]]{2})(:​[[:​xdigit:​]]{2}){5}'​
 </​code>​ </​code>​
 +==== 設DNS ====
 +Ubuntu很搞怪,不能直接改resolve.conf:​
 +<code basg>
 +systemd-resolve --set-dns=10.146.125.97 --interface enp3s0f0
 +</​code>​
 +