在Linux系统上,如何将stdout重定向到stderr?

nod*_*ase 6 linux stdout stderr output-redirect

我认为你不能只将stdout分配 stderr,因为在重新分配发生时,其他东西可能已经缓存(?)stdout.

那么我该怎么做(使用Linux)?

Am_*_*ful 13

要将stdout重定向到stderr,请使用以下命令: -

$ command-name 1>&2
Run Code Online (Sandbox Code Playgroud)

这里command-name是你要养活命令,1代表stdout,2代表stderr.