必要的修复:
s="SPT=80" # Not STP=80
此后已在问题中解决。
可能必要的修复:
if [[ "$x" == "$s" ]] # Space between if and [[ highly recommendedthen : it matcheselse : it does not matchfi
如注释中所述,
"%s "在
awk脚本中使用尾随空格表示将尾随空格存储在其中
"$x",这将破坏与的比较
"$s"。

必要的修复:
s="SPT=80" # Not STP=80
此后已在问题中解决。
可能必要的修复:
if [[ "$x" == "$s" ]] # Space between if and [[ highly recommendedthen : it matcheselse : it does not matchfi
如注释中所述,
"%s "在
awk脚本中使用尾随空格表示将尾随空格存储在其中
"$x",这将破坏与的比较
"$s"。