开发者

Running an array of processes

I have the following array:

procs=(
'one a b开发者_StackOverflow社区 c'
'two d e f'
'three g h i'
)

I try run these processes from a loop (using echo instead of eval so I can debug):

for proc in ${procs[@]}
do
  echo $proc
done

I get:

one
a
b
c
two
d
e
f
three
g
h
i

I wanted:

one a b c
two d e f
three g h i

What went wrong?


for proc in "${procs[@]}"
do
  echo $proc
done
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜