From ed1142abeb30b5b8808e4048a8f2e167276d7e43 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Wed, 13 Feb 2019 16:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- languages/bash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index 932f457..41d493e 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -299,7 +299,7 @@ text=$(IFS=/; echo "${array[*]}") # 用斜杠链接数组并赋值给变量 A=( foo bar "a b c" 42 ) # 数组定义 B=("${A[@]:1:2}") # 数组切片:B=( bar "a b c" ) -C=("${A[@]:1:2}") # 数组切片:C=( bar "a b c" 42 ) +C=("${A[@]:1}") # 数组切片:C=( bar "a b c" 42 ) echo "${B[@]}" # bar a b c echo "${B[1]}" # a b c echo "${C[@]}" # bar a b c 42