From d5c22388cda2fcf64022ceb835c245037f3f5dcd Mon Sep 17 00:00:00 2001 From: htpeng Date: Wed, 15 Oct 2025 08:40:55 +0000 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E6=80=A7:=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=89=87=E6=AE=B5=E9=94=99=E8=AF=AF=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: htpeng --- .../docs/memsafety/utshell/utshell_guide.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/zh/docs/memsafety/utshell/utshell_guide.md b/docs/zh/docs/memsafety/utshell/utshell_guide.md index 9e165806a..b5a7fafe3 100644 --- a/docs/zh/docs/memsafety/utshell/utshell_guide.md +++ b/docs/zh/docs/memsafety/utshell/utshell_guide.md @@ -56,7 +56,7 @@ var=4 ```shell -echo \${var} +echo ${var} ``` @@ -66,7 +66,7 @@ echo \${var} ```shell -distros=(ubuntu fedora suse \"arch linux\") +distros=(ubuntu fedora suse "arch linux") ``` @@ -74,7 +74,7 @@ distros=(ubuntu fedora suse \"arch linux\") ```shell -echo \${distros\[2\]} +echo ${distros[2]} ``` @@ -84,7 +84,7 @@ echo \${distros\[2\]} ```shell -func() { echo \$1; } +func() { echo $1; } ``` @@ -108,11 +108,11 @@ func firstParam secondParam func() { -echo \$1 \${10} \#需要传递 10 个参数 +echo $1 ${10} #需要传递 10 个参数 } -\#调用 +#调用 func 1 2 3 4 5 6 7 8 9 0 @@ -150,13 +150,13 @@ fi ```shell -if \[ \"\$s\" = \"string\" \]; then +if [ "$s" = "string" ]; then -echo \"string is equivalent to \\\$s\" +echo "string is equivalent to \$s" else -echo \"string is not equivalent to \\\$s\" +echo "string is not equivalent to \$s" fi @@ -226,7 +226,7 @@ for number in 1 2 3 4 5 do -echo \$number +echo $number done @@ -236,7 +236,7 @@ for number in {1..500..2} do -echo \$number +echo $number done @@ -248,7 +248,7 @@ done ```shell -until \[condition\]; do +until [ condition ]; do commands @@ -262,7 +262,7 @@ done ```shell -while \[ condition \]; do +while [ condition ]; do commands -- Gitee