Friday, June 3, 2016

shell - Redirect stderr and stdout in Bash




I want to redirect both stdout and stderr of a process to a single file. How do I do that in Bash?


Answer



Take a look here. Should be:



yourcommand &>filename


(redirects both stdout and stderr to filename).


No comments:

Post a Comment