bengoavs <[EMAIL PROTECTED]> wrote:
> CMDS=("ls -l > /tmp/log")
> ~/child.sh "${CMDS[0]}"
>
> child.sh:
> for i in "$@"
> do
>         if [ "$i" ]; then
>                 echo "$i"
>                 $i

Redirections and other special characters are not treated specially if
they are produced by a variable expansion.  In this case, you want:
  eval "$i"


paul


Reply via email to