From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 17:27:08 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79F0710656C5 for ; Wed, 20 Aug 2008 17:27:08 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout012.mac.com (asmtpout012.mac.com [17.148.16.87]) by mx1.freebsd.org (Postfix) with ESMTP id 690B48FC29 for ; Wed, 20 Aug 2008 17:27:08 +0000 (UTC) (envelope-from cswiger@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from cswiger1.apple.com ([17.227.140.124]) by asmtp012.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K5W00GVJTSRH610@asmtp012.mac.com> for freebsd-questions@freebsd.org; Wed, 20 Aug 2008 10:26:52 -0700 (PDT) Message-id: From: Chuck Swiger To: Matias Surdi In-reply-to: Date: Wed, 20 Aug 2008 10:26:51 -0700 References: X-Mailer: Apple Mail (2.928.1) Cc: freebsd-questions@freebsd.org Subject: Re: [OT] Evaluate strings in bash X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 17:27:08 -0000 On Aug 20, 2008, at 9:31 AM, Matias Surdi wrote: > I've the following variable: > > [code] > # echo $BINMAKE > `if [ -x /usr/obj/usr/src/make.i386/make ]; then echo /usr/obj/usr/ > src/make.i386/make; else echo make; fi` -m /usr/src/share/mk > # > [/code] > > It's a string wich includes a commmand. > > How can I get the subcommand replaced by its output? I think you're looking for "eval $BINMAKE"...? -- -Chuck