I need to call few SKILL procedure one by one. Each of the procedure is written in it's own file. So I need to load the SKILL file before calling the procedure. I also need the return value; generally a string might be some other data type; from the calling procedure. I know I can write the commands in a file and use "virtuoso -nograph -replay commands_file" to load and run the procedures. Is there a way to load file and call procedure without writing in a file? How can I get the return values?
That script called shout.il should answer your needs :
Don't shout it too loud though.
Hope it helps,
I think you misunderstood my question. I don't want to call shell commands from SKILL function. I want to call SKILL function from shell (csh in my case). I need to load .il file, call the function and get return value from the function.
There isn't really a direct way to do this, but it's easy enough to implement with a bit of thought (it's a bit of an odd request though). You could have a generic script called generic.il:
printf("RETURN VAL:%L\n" car(returnVal))
Then you create this simple wrapper shell script, runSingleCommand:
virtuoso -nograph -restore generic.il | grep "^RETURN VAL:" | sed -e 's/^RETURN VAL://'
Here's an example of a trial script to try it with, trial.il :
strcat("Hello World " a)
And finally how you run it:
UNIX> runSingleCommand trial.il 'helloWorld("Andrew")'"Hello World Andrew"
Thanks Andrew. It's a bit workaround but it works.