[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] 'bash' in 'bash' + 'set +o history'
From: |
calandraaspirate |
Subject: |
[Help-bash] 'bash' in 'bash' + 'set +o history' |
Date: |
Fri, 06 Sep 2019 10:22:53 +0000 |
User-agent: |
Roundcube Webmail/1.2.3 |
Hello
I wonder if anyone can point out the reason for the following behaviour:
1. 'set +o history' in '/etc/profile'
2. 1st 'bash' session respects this setting, no command history file is
written
3. From the 1st 'bash' session a 2nd one is started (parent process of
the 2nd one is the 1st)
4. The 2nd session logs history
Although, I hoped it was not. Why? Thanks!
Cheers
C.
---
address@hidden ~
$ tail /etc/profile
profile_d zsh
elif [ ! "x${POSH_VERSION}" = "x" ]; then
: # [ "${PS1-null}" = "null" ] || PS1="$ "
else
: # [ "${PS1-null}" = "null" ] || PS1="$ "
fi
# export PROFILEREAD PATH ORIGINAL_PATH MANPATH INFOPATH USER TMP TEMP
PRINTER HOSTNAME PS1 SHELL tmp temp
export PROFILEREAD PATH ORIGINAL_PATH INFOPATH USER TMP TEMP PRINTER
HOSTNAME PS1 SHELL
set +o history
address@hidden ~
$ man bash
...
set [--abefhkmnptuvxBCEHPT] [-o option-name] [arg ...]
set [+abefhkmnptuvxBCEHPT] [+o option-name] [arg ...]
...
-o option-name
...
history Enable command history, as described above
under HISTORY. This option is on by default in interactive shells.
...
If -o is supplied with no option-name, the
values of the current options are printed. If +o is supplied with no
option-name, a series of set commands to recreate
the current option settings is displayed on the
standard output.
...
address@hidden ~
$ set -o | grep history
history off
address@hidden ~
$ bash
address@hidden ~
$ set -o | grep history
history on
address@hidden ~
$ exit
exit
address@hidden ~
$ set -o | grep history
history off
address@hidden ~
$ cat .bash_history
set -o | grep history
exit
-------------------------------------------------
This free account was provided by VFEmail.net - report spam to address@hidden
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!
- [Help-bash] 'bash' in 'bash' + 'set +o history',
calandraaspirate <=