diff --git a/Nlbench_beta.sh b/Nlbench_beta.sh index fef65c5..0f76ad3 100644 --- a/Nlbench_beta.sh +++ b/Nlbench_beta.sh @@ -148,6 +148,7 @@ run_script() { sed -i 's/\.\.\./\.\.\.\n/g' "$temp_file" sed -i '/\.\.\./d' "$temp_file" sed -i '/^\s*$/d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_yabs" ;; # 融合怪 @@ -157,6 +158,7 @@ run_script() { sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" sed -i 's/\.\.\.\.\.\./\.\.\.\.\.\.\n/g' "$temp_file" sed -i '1,/\.\.\.\.\.\./d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_fusion" ;; # IP质量 @@ -164,7 +166,8 @@ run_script() { echo -e "运行${YELLOW}IP质量测试...${NC}" bash <(curl -Ls IP.Check.Place) | tee "$temp_file" sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" - sed -i '/\.\.\.\.\.\.\.\.\.\./d' "$temp_file" + sed -i -r '1,/########################################################################/d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_ip_quality" ;; # 流媒体解锁 @@ -182,6 +185,7 @@ run_script() { echo -e "运行${YELLOW}响应测试...${NC}" bash <(curl -sL https://nodebench.mereith.com/scripts/curltime.sh) | tee "$temp_file" sed -i 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_response" ;; # 多线程测速 @@ -192,6 +196,7 @@ run_script() { sed -i -r '1,/序号\:/d' "$temp_file" sed -i -r 's/(⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏)/\n/g' "$temp_file" sed -i -r '/测试进行中/d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_multi_thread" ;; # 单线程测速 @@ -202,6 +207,7 @@ run_script() { sed -i -r '1,/序号\:/d' "$temp_file" sed -i -r 's/(⠋|⠙|⠹|⠸|⠼|⠴|⠦|⠧|⠇|⠏)/\n/g' "$temp_file" sed -i -r '/测试进行中/d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_single_thread" ;; # iperf3测试 @@ -210,6 +216,7 @@ run_script() { run_iperf3_test | tee "$temp_file" sed -i -e 's/\x1B\[[0-9;]*[JKmsu]//g' "$temp_file" sed -i -r '1,/\[ ID\] /d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_iperf3" ;; # 回程路由 @@ -217,6 +224,7 @@ run_script() { echo -e "运行${YELLOW}回程路由测试...${NC}" wget -N --no-check-certificate https://raw.githubusercontent.com/Chennhaoo/Shell_Bash/master/AutoTrace.sh && chmod +x AutoTrace.sh && bash AutoTrace.sh <<< "1" | tee "$temp_file" sed -i -e 's/\x1B\[[0-9;]*[JKmsu]//g' -e '/测试项/,+9d' -e '/信息/d' -e '/^\s*$/d' "$temp_file" + sed -i '/^$/d' "$temp_file" # 删除空行 cp "$temp_file" "${output_file}_route" ;; esac