On 8/20/23 14:23, Greg Wooledge wrote:
On Sun, Aug 20, 2023 at 02:05:49PM -0400, Felix Miata wrote:
Bob Weber composed on 2023-08-20 11:04 (UTC-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?
In konsole its in the settings for the profile you are using. Mine just says
bash not /usr/bin/bash. If a profile uses ssh that will be there also. Its
under "Settings/Edit current profile" or "Settings/Manage profiles".
In the most recent versions of Konsole I've started (5.27.x), the default
profile
has inexplicably been changed from /bin/bash to /bin/sh.
The redirection syntax Gene is using is the same in all Bourne family
shells (anything that /bin/sh may legitimately point to, including
dash and bash).
Bash has a few extensions, of course, but none of them are in Gene's
original message.
If there's a legitimate concern that you might be in the wrong shell,
this command will tell you which shell is currently active:
ps -p $$
Which does indeed confirm its bash. Thanks Greg.
That works in all Bourne family and csh family shells, and on all Unix
systems (BSD- or System V-derived ps command syntax).
Avoid things like "echo $SHELL" because that may give misleading results.
The SHELL variable does *not* necessarily match the currently running
shell.
.
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/>