From 9d865abee1a3ddb8e07fac70637ac8b0159d094b Mon Sep 17 00:00:00 2001 From: Gabe Livengood Date: Thu, 14 Dec 2023 10:01:13 -0500 Subject: [PATCH] `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. --- pages.bn/common/[.md | 2 +- pages.de/common/[.md | 2 +- pages.es/common/[.md | 2 +- pages.fa/common/[.md | 2 +- pages.id/common/[.md | 2 +- pages.it/common/[.md | 2 +- pages.ja/common/[.md | 2 +- pages.ja/common/test.md | 2 +- pages.ko/common/[.md | 2 +- pages.nl/common/[.md | 2 +- pages.pl/common/[.md | 2 +- pages.pl/common/test.md | 2 +- pages.pt_BR/common/[.md | 2 +- pages.sv/common/[.md | 2 +- pages.zh/common/[.md | 2 +- pages/common/[.md | 2 +- pages/common/test.md | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pages.bn/common/[.md b/pages.bn/common/[.md index 05bdc373c..d96adb25c 100644 --- a/pages.bn/common/[.md +++ b/pages.bn/common/[.md @@ -6,7 +6,7 @@ - পরীক্ষা করুন যদি দেওয়া ভেরিয়েবল নির্দিষ্ট স্ট্রিং এর সমান/সমান না হয়: -`[ "${{ভেরিয়েবল}}" {{==|!=}} "{{স্ট্রিং}}" ]` +`[ "${{ভেরিয়েবল}}" {{=|!=}} "{{স্ট্রিং}}" ]` - পরীক্ষা করুন যদি দেওয়া ভেরিয়েবল [ই]কুয়াল/[ন]ট [ই]কুয়াল/[জি]টে [ল]েস [ট]হ্যান/[জি]টে [ই]কুয়াল/[ল]েস ট্রু থেকে/[ল]েস থেকে বা সমান নির্দিষ্ট সংখ্যায়: diff --git a/pages.de/common/[.md b/pages.de/common/[.md index 4dc11e9e6..1bc65f0b8 100644 --- a/pages.de/common/[.md +++ b/pages.de/common/[.md @@ -6,7 +6,7 @@ - Überprüfe, ob eine bestimmte Variable gleich oder ungleich einem bestimmen String ist: -`[ "${{variable}}" {{==|!=}} "{{string}}" ]` +`[ "${{variable}}" {{=|!=}} "{{string}}" ]` - Überprüfe, ob eine Variable gleich/ungleich/größer/kleiner/größer-gleich oder kleiner-gleich als eine bestimme Zahl ist: diff --git a/pages.es/common/[.md b/pages.es/common/[.md index 0d7825757..75b2184e7 100644 --- a/pages.es/common/[.md +++ b/pages.es/common/[.md @@ -6,7 +6,7 @@ - Comprueba si una variable dada es igual/no es igual a la cadena especificada: -`["${{variable}}" {{==|!=}} "{{cadena}}" ]` +`["${{variable}}" {{=|!=}} "{{cadena}}" ]` - Prueba si una variable dada es [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater que o [e]qual/[l]ess que o [e]qual al número especificado: diff --git a/pages.fa/common/[.md b/pages.fa/common/[.md index 4a48c1044..1101c0def 100644 --- a/pages.fa/common/[.md +++ b/pages.fa/common/[.md @@ -6,7 +6,7 @@ - بررسی میکند که آیا یک متغییر با رشته معین برابر است یا نابرابر : -`[ "${{متغییر}}" {{==|!=}} "{{رشته}}" ]` +`[ "${{متغییر}}" {{=|!=}} "{{رشته}}" ]` - اینکه متغییری برابر/ نابرابر/ بزرگتر از/ کوچکتر از/ برابر یا بزرگتر/ کوچکتر یا برابر با عددی است را بررسی میکند : diff --git a/pages.id/common/[.md b/pages.id/common/[.md index 163d705eb..1cdf44d84 100644 --- a/pages.id/common/[.md +++ b/pages.id/common/[.md @@ -6,7 +6,7 @@ - Ujikan apakah sebuah variabel memiliki nilai yang sama/tidak sama dengan sebuah string: -`[ "${{variabel}}" {{==|!=}} "{{string}}" ]` +`[ "${{variabel}}" {{=|!=}} "{{string}}" ]` - Ujikan apakah sebuah variabel memiliki nilai yang sama/tidak sama/lebih besar/lebih kecil/lebih besar atau sama dengan/lebih kecil atau sama dengan sebuah angka: diff --git a/pages.it/common/[.md b/pages.it/common/[.md index d36b6dc94..1afd75a44 100644 --- a/pages.it/common/[.md +++ b/pages.it/common/[.md @@ -6,7 +6,7 @@ - Verifica se una determinata variabile è uguale/diversa dalla stringa specificata: -`[ "${{variabile}}" {{==|!=}} "{{stringa}}" ]` +`[ "${{variabile}}" {{=|!=}} "{{stringa}}" ]` - Verifica se una variabile data è [eq]uguale/[n]on [e]uguale/[g]maggiore [t]di/[l]minore [t]di/[g]maggiore di o [e]uguale/[l]minore di o [e]uguale al numero specificato: diff --git a/pages.ja/common/[.md b/pages.ja/common/[.md index e02e71c91..102f58735 100644 --- a/pages.ja/common/[.md +++ b/pages.ja/common/[.md @@ -6,7 +6,7 @@ - 与えられた変数が与えられた文字列と等しいかどうかをテスト: -`[ "{{$変数名}}" == "{{/bin/zsh}}" ]` +`[ "{{$変数名}}" = "{{/bin/zsh}}" ]` - 与えられた変数が空であるかどうかをテスト: diff --git a/pages.ja/common/test.md b/pages.ja/common/test.md index 8d9187dea..c09c40b61 100644 --- a/pages.ja/common/test.md +++ b/pages.ja/common/test.md @@ -6,7 +6,7 @@ - 与えられた変数が与えられた文字列と等しいかどうかをテスト: -`test "{{$変数名}}" == "{{/bin/zsh}}"` +`test "{{$変数名}}" = "{{/bin/zsh}}"` - 与えられた変数が空であるかどうかをテスト: diff --git a/pages.ko/common/[.md b/pages.ko/common/[.md index 104a16819..da9c49891 100644 --- a/pages.ko/common/[.md +++ b/pages.ko/common/[.md @@ -6,7 +6,7 @@ - 주어진 변수가 문자열과 같은지/다른지 비교: -`[ "${{변수}}" {{==|!=}} "{{문자열}}" ]` +`[ "${{변수}}" {{=|!=}} "{{문자열}}" ]` - 주어진 변수가 주어진 숫자와 같은지[eq]/다른지[ne]/보다 큰지[gt]/보다 작은지[lt]/크거나 같은지[ge]/작거나 같은지[le] 비교: diff --git a/pages.nl/common/[.md b/pages.nl/common/[.md index c709fbed6..4d608244f 100644 --- a/pages.nl/common/[.md +++ b/pages.nl/common/[.md @@ -6,7 +6,7 @@ - Test of een gegeven variabele gelijk is aan een gegeven tekst: -`[ "${{variable}}" {{==|!=}} "{{string}}" ]` +`[ "${{variable}}" {{=|!=}} "{{string}}" ]` - Test of een gegeven variabele gelijk/niet gelijk/groter dan/kleiner dan/groter dan of gelijk/kleiner dan of gelijk aan het gegeven nummer: diff --git a/pages.pl/common/[.md b/pages.pl/common/[.md index cf63d5efb..3ee9bfce1 100644 --- a/pages.pl/common/[.md +++ b/pages.pl/common/[.md @@ -6,7 +6,7 @@ - Sprawdź czy podana zmienna jest równa łańcuchowi znaków: -`[ "{{$ZMIENNA}}" == "{{/bin/zsh}}" ]` +`[ "{{$ZMIENNA}}" = "{{/bin/zsh}}" ]` - Sprawdź czy zmienna jest pusta: diff --git a/pages.pl/common/test.md b/pages.pl/common/test.md index 7f62ec1ce..45eff3b03 100644 --- a/pages.pl/common/test.md +++ b/pages.pl/common/test.md @@ -6,7 +6,7 @@ - Sprawdź czy podana zmienna jest równa łańcuchowi znaków: -`test "{{$ZMIENNA}}" == "{{/bin/zsh}}"` +`test "{{$ZMIENNA}}" = "{{/bin/zsh}}"` - Sprawdź czy zmienna jest pusta: diff --git a/pages.pt_BR/common/[.md b/pages.pt_BR/common/[.md index fbc085180..995916fd2 100644 --- a/pages.pt_BR/common/[.md +++ b/pages.pt_BR/common/[.md @@ -6,7 +6,7 @@ - Testa se uma determinada variável é igual a uma determinada string: -`[ "{{variavel}}" == "{{/bin/zsh}}" ]` +`[ "{{variavel}}" = "{{/bin/zsh}}" ]` - Testa se uma determinada variável é igual/diferente/maior que/menor que/maior ou igual/menor ou igual a um determinado inteiro: diff --git a/pages.sv/common/[.md b/pages.sv/common/[.md index f70ebdd0e..2a1acf256 100644 --- a/pages.sv/common/[.md +++ b/pages.sv/common/[.md @@ -6,7 +6,7 @@ - Testa om en given variabel är lika med en given sträng: -`[ "{{$VARIABEL}}" == "{{/bin/zsh}}" ]` +`[ "{{$VARIABEL}}" = "{{/bin/zsh}}" ]` - Testa om en given variabel är tom: diff --git a/pages.zh/common/[.md b/pages.zh/common/[.md index e3b5559ad..bee972ad2 100644 --- a/pages.zh/common/[.md +++ b/pages.zh/common/[.md @@ -6,7 +6,7 @@ - 测试一个给定的变量是否等于/不等于指定的字符串: -`[ "${{变量}}" {{==|!=}} "{{字符串}}" ]` +`[ "${{变量}}" {{=|!=}} "{{字符串}}" ]` - 测试一个给定的变量是否等于/不等于/大于/小于/大于等于/小于等于指定的数字: diff --git a/pages/common/[.md b/pages/common/[.md index 6b50f5fe1..4a5f1383a 100644 --- a/pages/common/[.md +++ b/pages/common/[.md @@ -6,7 +6,7 @@ - Test if a given variable is equal/not equal to the specified string: -`[ "${{variable}}" {{==|!=}} "{{string}}" ]` +`[ "${{variable}}" {{=|!=}} "{{string}}" ]` - Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number: diff --git a/pages/common/test.md b/pages/common/test.md index 35e84e066..9ede257c8 100644 --- a/pages/common/test.md +++ b/pages/common/test.md @@ -6,7 +6,7 @@ - Test if a given variable is equal to a given string: -`test "{{$MY_VAR}}" == "{{/bin/zsh}}"` +`test "{{$MY_VAR}}" = "{{/bin/zsh}}"` - Test if a given variable is empty: