Executing a variable that strores a unix command string

Hi:

I have a touble with executing a variable that stores a unix command string.

The following would be excuted fine:

command='ls -l'
`echo $command`

However, the following gives me an error:

command='(uuencode file1 file1; uuencode file2 file2) | mailx email_id'
`echo $command`

The error message is "ksh: (uuencode: not found"

If anyone can explain why I get the error and a way to get around the error, I would really appreciate it.

Thanks,

It is looking for the command (uuencode which of course does not exist on your system (it does not start a subshell first). Try:

eval "$command"