bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SHELLOPTS=xtrace security hardening


From: Chet Ramey
Subject: Re: SHELLOPTS=xtrace security hardening
Date: Tue, 15 Dec 2015 11:18:35 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

On 12/15/15 10:40 AM, Stephane Chazelas wrote:
> 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 !!'
> !!

Thanks, I'll take a look.  It works when run as a script.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]