Long story short, you probably want something like "./findhost.sh \$(exec ${topdir}/config.guess)"
where the second "$" character is not escaped so that tcl can replace topdir with the right directory name. Marin On Thu, Dec 22, 2011 at 2:48 AM, Marin Saric <marin.sa...@gmail.com> wrote: > I think you need to escape the "$" character to "\$" inside the > command or use the curly braces '{' and '}' instead of double quotes. > When using quotes, tcl catches the $ sign and thinks that what follows > is a variable. This is a language feature known as "interpolation". > > It then attempts to find the variable called "(exec > ${topdir}/config.guess)" . Such a variable doesn't exist, hence the > reported error. > > This page sums up Tcl quoting rules quite well: > http://wiki.tcl.tk/1726 > > Marin > > On Thu, Dec 22, 2011 at 2:22 AM, Mark Brethen <mark.bret...@gmail.com> wrote: >> This line in my portfile: >> >> set builddir [system -W ${topdir}/scripts "./findhost.sh $(exec >> ${topdir}/config.guess)"] >> >> is giving an error >> >> :error:activate Target org.macports.activate returned: can't read "(exec >> /opt/local/libexec/reduce-algebra/config.guess)": no such variable >> >> I'm trying to pass the result of config.guess to another shell script >> findhost. Could someone point out the error? >> >> Mark >> >> >> >> >> _______________________________________________ >> macports-dev mailing list >> macports-dev@lists.macosforge.org >> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev _______________________________________________ macports-dev mailing list macports-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev