Appendix: Reference

Environment Variables

Overview | Environment Variables | Shell Commands | Uses | Reserved Variables


Shell Commands

Omnidex allows shell commands to be used in place of environment variables as well. This allows for the use of shell scripts, regular expressions or other commands to be used when constructing a value. This can be especially helpful for externalizing the metadata.

Syntax

The syntax for using shell commands is to enclose the string in curly braces, and then surround the shell command with parentheses. The following examples show different approaches to issuing shell commands.

Running a shell script

UNIX
{$(myshell.ksh)}
Windows
{$(myshell.bat)}

Issuing a UNIX command

The following command produces a filename that concatenates the host name and the date stamp with a .log file extension:

UNIX
{$(echo `hostname`_`date '+%Y%m%d'`.log)}

Security

Many system administrators would be reluctant to expose shell commands in an application. If you use shell commands in your metadata, be sure too coordinate with your system administrator to insure that all security concerns are met.

Executing Shell Commands

Omnidex will execute the shell commands once when the process is loaded or when they are first used. The commands are not run repeatedly, and therefore they will not be sensitive to changes that may have occurred while the process is running.

Prev | Next

Additional Resources

See also: