Friday, 3 June 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

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...