On Sun, Aug 20, 2023 at 10:28:44AM -0400, gene heskett wrote:
> I cannot make bashes redirection (cmd 2>&1 >tmp/cmd.log) work in Konsole.
> What terminal actually uses bash for the heavy lifting?

The terminal is irrelevant.  This is entirely done in the shell.

Your redirections are backwards.  If you want both stdout and stderr
in the same file, you need 2>&1 to be *last*.  Also, you *might* want
/tmp/cmd.log to be an absolute path.

    cmd >/tmp/cmd.log 2>&1

If tmp is a local directory relative to your working directory, then
ignore that change.  But the 2>&1 being last matters here.

See also <https://mywiki.wooledge.org/BashFAQ/055>.

Reply via email to