test
: Use POSIX-compliant example for equals comparison (#11728)
* [: use posix-compliant example for equals comparison the previous example worked fine for bash, but some other shells (zsh, in my case) will not work when using "==" for comparison. the posix spec only requires "=", so I think it makes a little more sense to use that in the example. * test: use posix-compliant example for equals comparison the previous example worked fine for bash, but some other shells (zsh, in my case) will not work when using "==" for comparison. the posix spec only requires "=", so I think it makes a little more sense to use that in the example.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
- 测试一个给定的变量是否等于/不等于指定的字符串:
|
||||
|
||||
`[ "${{变量}}" {{==|!=}} "{{字符串}}" ]`
|
||||
`[ "${{变量}}" {{=|!=}} "{{字符串}}" ]`
|
||||
|
||||
- 测试一个给定的变量是否等于/不等于/大于/小于/大于等于/小于等于指定的数字:
|
||||
|
||||
|
Reference in New Issue
Block a user