On 8/20/23 10:36, Greg Wooledge wrote:
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.

it is local to /home/me. And that order of arguments is not mentioned in the bash scripting manual I printed several years ago. About 500 pages of it.

However it just now worked, I now have the log Maik on the digikam list requested, and my dead tree bash script docs are out of date. Many thanks, take care & stay well, Greg.

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

.

Cheers, Gene Heskett.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/>

Reply via email to