Focal Point
[SOLVED] Linux/Unix question

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1447046766

March 05, 2014, 10:24 AM
jgelona
[SOLVED] Linux/Unix question
I'm having trouble with the import script for MRE in WebFOCUS 8. I'm trying to understand what is going on and I have a question about some syntax used in the script and hoping someone here has an answer. (I do have a problem report open with IBI).

Assume you have a variable WFROOT and it is set to "/opt/ibi/WebFOCUS80".

What is the difference between $WFROOT and ${WFROOT}?

This message has been edited. Last edited by: <Kathryn Henning>,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
March 06, 2014, 08:26 PM
StuBouyer
Ahh, this will depend somewhat on the exact Shell you are using, but I use ${variable_name} by default because it allows you use your variable in the middle of another string:

FILENAME=output

tail ${FILENAME}_LOG

This will run tail on the file output_log, while

tail $FILENAME_LOG

will fail unless you have a variable called FILENAME_LOG

Exceptionally useful when you are doing things like renaming file extensions.

For a great intro to script writing(specifically BASH) have a look at http://www.ibm.com/developerworks/library/l-bash/

Cheers

Stuart


WebFOCUS 8.2.03 (8.2.06 in testing)
March 07, 2014, 08:22 AM
jgelona
Cool. Thanks for the explanation.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.