[root@lovefirewall ~]# echo $tablesshell
[root@lovefirewall ~]# echo $switchbash
[root@lovefirewall ~]# [[ $tables -eq 0 ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
off
[root@lovefirewall ~]# unset switch
[root@lovefirewall ~]# echo $switch運維
[root@lovefirewall ~]# [[ $tables == ^$ ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
on
[root@lovefirewall ~]# unset switch
[root@lovefirewall ~]# echo $switchide
[root@lovefirewall ~]# [[ $tables == [[:space:]] ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
on
[root@lovefirewall ~]# unset switch
[root@lovefirewall ~]# echo $switch測試
[root@lovefirewall ~]# [[ $tables == "" ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
off
[root@lovefirewall ~]# unset switch
[root@lovefirewall ~]# echo $switchspa
[root@lovefirewall ~]# [[ 0 == "" ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
on
[root@lovefirewall ~]# unset switch
[root@lovefirewall ~]# echo $tables日誌
[root@lovefirewall ~]# echo $switchtoken
[root@lovefirewall ~]# [[ $tables == 0 ]] && switch=off || switch=on
[root@lovefirewall ~]# echo $switch
on
[root@lovefirewall ~]# 字符串
[root@lovefirewall ~]# [[ 11.11 -eq 11.22 ]] && echo wrong || echo right
-bash: [[: 11.11: syntax error: invalid arithmetic operator (error token is ".11")
right
[root@lovefirewall ~]# [[ 11.11 == 11.22 ]] && echo wrong || echo right
right
[root@lovefirewall ~]# [[ 11.11 == 11.12 ]] && echo wrong || echo right
right
[root@lovefirewall ~]# [[ 10.10 == 10.01 ]] && echo wrong || echo right
right
[root@lovefirewall ~]# it