[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SHELLOPTS=xtrace security hardening
From: |
Stephane Chazelas |
Subject: |
Re: SHELLOPTS=xtrace security hardening |
Date: |
Tue, 15 Dec 2015 15:40:44 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
2015-12-15 09:01:05 -0500, Chet Ramey:
[...]
> > Mind explaining this one?
> > I can't seem to write to HISTFILE in a non-interactive shell, or am i
> > missing something?
>
> You just need to enable history (set -o history). History is independent
> of whether or not the shell is interactive; it's just enabled by default
> in interactive shells.
[...]
BTW:
$ bash -o history -o histexpand -c 'echo !!'
!!
$ bash -o history -o histexpand <<< 'echo !!'
!!
$ SHELLOPTS=history:histexpand bash -c 'echo !!'
!!
$ SHELLOPTS=history:histexpand bash <<< 'echo !!'
bash: line 1: !!: event not found
$ SHELLOPTS=history:histexpand bash <(<<<'echo !!')
/proc/self/fd/11: line 1: !!: event not found
$ bash -o history -o histexpand <(<<< 'echo !!')
!!
(also note that when there is an error, the exit status is 0)
--
Stephane
- Re: SHELLOPTS=xtrace security hardening, (continued)
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/13
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/14
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/16
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening,
Stephane Chazelas <=
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Stephane Chazelas, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, Chet Ramey, 2015/12/15
- Re: SHELLOPTS=xtrace security hardening, up201407890, 2015/12/16