See the "system" keyword, and output redirection.