linux,shell如何把字符串变成数组?

2025-01-02 01:45:30
推荐回答(1个)
回答1:

$ url='A B C'
$ a=($(echo $url))
$ echo ${a[1]}
B
$ echo ${a[0]}
A