Curious bash evaluation

inode0 inode0 at gmail.com
Mon Dec 27 16:46:42 UTC 2010


On Mon, Dec 27, 2010 at 10:05 AM, Rodolfo Alcazar Portillo
<nospaze at gmail.com> wrote:
> Hello. See this:
>
> # A="echo 'hi'"
>
> # echo $($A)
> 'hi'

That seems rather convoluted. Are you sure you don't just want to
"eval $A" anyway?

I realize your example may be a simple abstraction of something more complex.

John


More information about the users mailing list