From owner-freebsd-questions@FreeBSD.ORG Wed Aug 20 21:22:01 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 908841065675 for ; Wed, 20 Aug 2008 21:22:01 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 520178FC21 for ; Wed, 20 Aug 2008 21:22:00 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KVv7m-0002Bl-Qy for freebsd-questions@freebsd.org; Wed, 20 Aug 2008 21:21:50 +0000 Received: from 85.48.193.152 ([85.48.193.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2008 21:21:50 +0000 Received: from matiassurdi by 85.48.193.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Aug 2008 21:21:50 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Matias Surdi Date: Wed, 20 Aug 2008 23:21:39 +0200 Lines: 41 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.48.193.152 User-Agent: Thunderbird 2.0.0.16 (X11/20080724) In-Reply-To: Sender: news 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 21:22:01 -0000 Matias Surdi escribió: > Hi, sorry for the offtopic, but maybe somebody can help me here. > > 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'd like to have a second variable like: > > [code] > # echo $newvariable > make -m /usr/src/share/mk > # > [code] > > > Thanks a lot. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > I've finally managed to do what I was trying to do, look here: http://www.linuxquestions.org/questions/linux-general-1/bash-strings-evaluation-664094/ Thank you all for your help :-)