>Take a look at the arguments you are actually using:
[root~] printf "%s" ${cc[1]}
bash-c"timels-l"
Again, I can't see the missing "
>use eval
I didn't know the shell had an eval so that solves that!
Much thanks.
--
View this message in context:
http://www.nabble.com/parse-error-running-b
cc=('who' 'bash -c "time ls -l"' 'date')
for e in 0 1 2; do ${cc[$e]}; done
produces an error:
ls: -c: line 0: unexpected EOF while looking for matching `"'
ls: -c: line 1: syntax error: unexpected end of file
well, there isn't a missing " AFAICT, and playing around with them has not
helped. D