Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 680 Bytes

execute-scripts.md

File metadata and controls

29 lines (21 loc) · 680 Bytes

Executing scripts

Run a script:

foo> java -jar venice-1.7.8.jar -script "(+ 1 1)"
=> 2

Load the script from a file and run it:

foo> echo "(+ 1 1)" > script.venice
foo> java -jar venice-1.7.8.jar -file script.venice
=> 2

Venice passes the command line args as *ARGV* vector:

foo> echo "(+ 1 (long (nth *ARGV* 2)))" > script.venice
foo> java -jar venice-1.7.8.jar -file script.venice 3
=> 4

Note: the command line args are only available when executing a script in the ways shown above. The command line args are not available in the REPL and for security reasons they are not available with embedding Venice in Java!