run
eharetea

The run expression is used to execute Hscript.

RUN can be used in a variety of ways, most of which involve running commands.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 03:02 PM

example of run used in Hscript to evaluate Hscript within an Expression ( yes, it can get complex )
set foo = `argc(run("opls"))`


you could look at it as houdini's version of the system command.

this is the system command, this sets foo to the output of the ls command at the current unix path
set foo = `system("ls")`


this is the run command, this sets foo to the output of the ls command at the current houdini path
set foo = `run("opls")`


It is very common if foreach loops
foreach z(`run("opfind -t mantra")`)

    echo $z

end