Date: Wed, 20 Aug 2008 23:21:39 +0200 From: Matias Surdi <matiassurdi@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: [OT] Evaluate strings in bash Message-ID: <g8i1t3$fqb$1@ger.gmane.org> In-Reply-To: <g8hgs8$f13$2@ger.gmane.org> References: <g8hgs8$f13$2@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 :-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?g8i1t3$fqb$1>