Home Reference HScript commands 

unix hscript command

Starts a host system command.

Usages

  1. unix command

Note

Despite its name, the unix command works on non-UNIX operating systems.

On Linux, Houdini runs the command as “csh -f -c command”.

Houdini passes any global HScript variables to the external process as environment variables, and sets the status variable to the exit code of the command.

Tip

Houdini includes dedicated HScript commands to call typical host system commands, such as uls to list the contents of a directory, urm to remove a file, and upwd to print the current directory.

To make your code portable to non-UNIX systems such as Windows, use these HScript commands instead of explicitly calling the equivalent UNIX utility (ls, rm, pwd, etc.).

Tip

To do redirection in the external shell (such as >&), enclose the argument in single quotes to prevent the Houdini command interpreter from acting on the redirection before the external shell can see it.

unix myscript.pl '>output.txt'