Redirect the output of a command to a file

To redirect the output of an HScript command to a file, use >filename in the command. To append to the file instead of overwriting it, use >>filename. To redirect the error output and the standard output of a command, use >&filename.

When using the unix command to launch an external process, you may want to do redirection in the external shell instead of in the textport. 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'