From fdff570557a249c422caf872db10fa4865c04102 Mon Sep 17 00:00:00 2001 From: xykt <152045469+xykt@users.noreply.github.com> Date: Thu, 24 Apr 2025 00:18:26 +0800 Subject: [PATCH] Update net.sh Optimize compatibility of uppercase file suffixes --- net.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net.sh b/net.sh index 91f016f..cd012ce 100644 --- a/net.sh +++ b/net.sh @@ -1,5 +1,5 @@ #!/bin/bash -script_version="v2025-04-23" +script_version="v2025-04-24" ADLines=25 check_bash(){ current_bash_version=$(bash --version|head -n 1|awk '{for(i=1;i<=NF;i++) if ($i ~ /^[0-9]+\.[0-9]+(\.[0-9]+)?/) print $i}') @@ -2841,9 +2841,9 @@ show_tail) echo -ne "\r\n" if [[ mode_output -eq 1 ]];then case "$outputfile" in -*.ansi)echo "$net_report" >>"$outputfile" 2>/dev/null +*.[aA][nN][sS][iI])echo "$net_report" >>"$outputfile" 2>/dev/null ;; -*.json)echo "$netdata" >>"$outputfile" 2>/dev/null +*.[jJ][sS][oO][nN])echo "$netdata" >>"$outputfile" 2>/dev/null ;; *)echo -e "$net_report"|sed 's/\x1b\[[0-9;]*[mGKHF]//g' >>"$outputfile" 2>/dev/null esac