[OT] Evaluate strings in bash
matiassurdi at gmail.com
Wed Aug 20 17:30:16 UTC 2008
Oliver Fromme escribió:
> Matias Surdi wrote:
> > # 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
> > I'd like to have a second variable like:
> > [code]
> > # echo $newvariable
> > make -m /usr/src/share/mk
> # newvariable=`eval echo $BINMAKE`
> By the way, this has nothing to do with bash. Those things
> work with every bourne shell, including FreeBSD's /bin/sh.
> It even works with Solaris' /bin/sh which is very far from
> a POSIX shell. :-)
> Best regards
I've already tried that, but doesn't work.
$newvariable will end with the output of running "make -m
/usr/src/share/mk" on the current directory and not with the string
"make -m /usr/src/share/mk" which is wat I want.
Thanks a lot for your help.
More information about the freebsd-questions