Using v5141, I am trying to set a SKILL variable value to be the result of a shell evaluation (which should return a text string).
The shell operation is on a file generated during the Virtuoso session, otherwise it could be set in the .cdsinit or shell prior to running Virtuoso.
For example in Virtuoso I have just generated a log file:
myvar=system("grep myword mylogfile")
The system (or shell) command will write the text string to stdout of the shell, but puts the return value of the system() process into the SKILL variable.
While the shell will display the result of the grep operation (eg "myword"), the CIW gets a process return value, not the result of the grep.
printf("%L" myvar) ==> 0
I have tried using setShellEnvVar() to assign the variable to be in the shell and then reading it in.
setShellEnvVar("myvar=`grep myword mylogfile`")
But getShellEnvVar() returns the literal unevaluated string, not the shell evaluation.
getShellEnvVar("myvar") ==> "`grep myword mylogfile`"
How do you assign a SKILL variable value to the the string result of a shell operation like grep?