Putting variables into a register
I've been struggling with the best way to accomplish this. Here is the line I have in Build Forge:
.push LOGFILE ../../../var/mydir/logs/$APPNAME_$PATHNAME.xml.log
Where
LOGFILE = Name of register
APPNAME = environment variable set previously
PATHNAME = environment variable set previously
What happens is is that it thinks $APPNAME_ is the variable name. I can't seem to get it to ignore the _ as part of the variable name and treat it as a literal.
Any suggestions?
Thanks!
.push LOGFILE ../../../var/mydir/logs/$APPNAME_$PATHNAME.xml.log
Where
LOGFILE = Name of register
APPNAME = environment variable set previously
PATHNAME = environment variable set previously
What happens is is that it thinks $APPNAME_ is the variable name. I can't seem to get it to ignore the _ as part of the variable name and treat it as a literal.
Any suggestions?
Thanks!
2 answers
I've been struggling with the best way to accomplish this. Here is the line I have in Build Forge:
.push LOGFILE ../../../var/mydir/logs/$APPNAME_$PATHNAME.xml.log
Where
LOGFILE = Name of register
APPNAME = environment variable set previously
PATHNAME = environment variable set previously
What happens is is that it thinks $APPNAME_ is the variable name. I can't seem to get it to ignore the _ as part of the variable name and treat it as a literal.
Any suggestions?
Thanks!
Try $(xxx) or ${xxx} form
I've been struggling with the best way to accomplish this. Here is the line I have in Build Forge:
.push LOGFILE ../../../var/mydir/logs/$APPNAME_$PATHNAME.xml.log
Where
LOGFILE = Name of register
APPNAME = environment variable set previously
PATHNAME = environment variable set previously
What happens is is that it thinks $APPNAME_ is the variable name. I can't seem to get it to ignore the _ as part of the variable name and treat it as a literal.
Any suggestions?
Thanks!
Try $(*) or ${*} form
${*} worked just fine. I was attempting to use ", ', or ` to try to accomplish this. Thanks for the help Lewis!