400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

shell中返回一个数组

#!/bin/sh

get_array()
{
a=123
b="123"
c="abc"
echo "$a \"$b\" $c"
}
echo \(`get_array`\)

eval " tt=$(echo \( $(get_array) \) ) "

echo "----XXX ${tt[0]}"
echo "----XXX ${tt[1]}"
echo "----XXX ${tt[2]}"
echo "----XXX ${tt[3]}"
echo "----XXX ${tt[4]}"
echo "----XXX ${tt[5]}"

网站标题:shell中返回一个数组
网站网址:http://www.bluegullmedia.com/article/ghhpgi.html

其他资讯

让你的专属顾问为你服务

0.0387s