Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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!

0 votes



2 answers

Permanent link
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

0 votes


Permanent link
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!

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 07 '11, 10:06 p.m.

Question was seen: 6,687 times

Last updated: Mar 07 '11, 10:06 p.m.

Confirmation Cancel Confirm