def add_shell_command_output(self, output_path):
        """"
        Get output of the required shell command and redirect the output to output path.

        :param output_path: Directory where output files will be written
        :param output_path: ``str``
        """
        LOG.debug('Including the required shell commands output files')
        for cmd in self.shell_commands:
            output_file = os.path.join(output_path, '%s.txt' % self.format_output_filename(cmd))
            exit_code, stdout, stderr = run_command(cmd=cmd, shell=True)
            with open(output_file, 'w') as fp:
                fp.write('[BEGIN STDOUT]\n')
                fp.write(stdout)
                fp.write('[END STDOUT]\n')
                fp.write('[BEGIN STDERR]\n')
                fp.write(stderr)
                fp.write('[END STDERR]')
dataset/ETHPy150Open StackStorm/st2/st2debug/st2debug/cmd/submit_debug_info.py/DebugInfoCollector.add_shell_command_output/original