Quantcast
Channel: Cadence Technology Forums
Viewing all articles
Browse latest Browse all 62971

Forum Post: RE: Load SKILL file, call procedure and get return value (string) from Linux Terminal

$
0
0
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 : errset(load(getShellEnvVar("SOURCEFILE"))) returnVal=errsetstring(getShellEnvVar("FUNCTIONTOCALL")) printf("RETURN VAL:%L\n" car(returnVal)) exit() Then you create this simple wrapper shell script, runSingleCommand : #!/bin/sh export SOURCEFILE=$1 export FUNCTIONTOCALL=$2 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 : procedure(helloWorld(a) strcat("Hello World " a) ) And finally how you run it: UNIX> runSingleCommand trial.il 'helloWorld("Andrew")' "Hello World Andrew" Regards, Andrew.

Viewing all articles
Browse latest Browse all 62971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>