This is an old revision of the document!
Omnidex allows shell commands to be used in place of environment variables as well. This allows for the use of regular expressions, shell or perl scripts or other commands to be used when constructing a value. This can be especially helpful for externalizing the metadata.
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)}
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.
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.
See also: