bash : Self redirect of Script’s output to a file
Using shell builtin exec, ouput and error output streams of a script can be redirected just like ">" or ">>" operators.
Using shell builtin exec, ouput and error output streams of a script can be redirected just like ">" or ">>" operators.