I know the answer for some shells, e.g. with
cmd.exe you can:
some.exe > out.txt 2>&1
How do you achieve the same for other shells (bash, ksh, tcsh, powershell, etc)?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
In Powershell it is exactly the same:
2>&1 Sends errors to the get-process none, powershell 2>&1 success output stream.
bash and ksh at least I also know it works this way.
It seems to be a common convention.
A quick way to find out about it is by opening the man page of the shell and do a search for
/ and then typing
&1). This rarely occurs in other contexts.