bug-bash
[Top][All Lists]
Advanced

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

Re: Space or multiple spaces before command causes it to not get logged


From: Pierre Gaston
Subject: Re: Space or multiple spaces before command causes it to not get logged
Date: Fri, 25 May 2012 09:32:25 +0300

On Fri, May 25, 2012 at 6:05 AM,  <address@hidden> wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib  
> -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 
> -Wformat -Wformat-security -Werror=format-security -Wall
> uname output: Linux gouch.ihate.ms 3.2.0-24-virtual #38-Ubuntu SMP Tue May 1 
> 16:38:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
>
> Bash Version: 4.2
> Patch Level: 24
> Release Status: release
>
> Description:
>
> Putting a space or multiple spaces before a command and executing it causes 
> the command to not get logged to bash history file.
>
>
> Repeat-By:
>
> address@hidden:~$ pwd
> /root
> address@hidden:~$ history
>    1  pwd
>    2  history
> address@hidden:~$  ls  <------ Note the space before the command
> address@hidden:~$ date
> Fri May 25 02:59:43 UTC 2012
> address@hidden:~$ history
>    1  pwd
>    2  history
>    3  date
>    4  history

Probably a feature, check if the variable HISTCONTROL contains
"ignorespace" and the value of HISTIGNORE (printf %q\\n "$HISTIGNORE")



reply via email to

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