- To: slug <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] Re: useful bash tricks thread
- From: Owen Townend <owen.townend@xxxxxxxxx>
- Date: Mon, 9 Feb 2009 16:43:16 +1100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=Ysp3xf8OoiebLxsWOuNXz4EY+4+y7oHTi4ytX+EVT2c=; b=O65nQZgL5+lGtvRLv0KONK1CG2ddW1Bnz90UNHQTQBK0ZjZyHakfemV9F5cFHwHY7O cAOTaUw1zZBGM46wp1Ise7S4WiLvTqjgDmeifk8GmHjwrH0xNOUoODDLvh+ufy+8LBcI ieu7GV1g0hB7oRce5rdxpzeFO/oqIiKiSAQic=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=S0OgSgJgx1uo8t1aqbniT6KA6z2oHynHA3oXqwrX+0WysnZIyT/iEtSResFraW79dF nr554YYy954uwXkLTGfZuJCLI5vCukxwLrA2MeUX3CSKdRvgV+174ncARNudfKFTaAjs NPnJCJv9uXz68JcvRTfOihuMnfX3NVLQtPz+Q=
2009/2/9 Rick Welykochy <rick@xxxxxxxxxxxxx>:
> Owen Townend wrote:
>>
>> 2009/2/9 Amos Shapira <amos.shapira@xxxxxxxxx>:
>> [snip]
>>>
>>> And one last thing, related to security - if you type a sensitive
>>> string on the command line and get it into your history, use "history
>>> -d" to delete this line.
>>>
>>
>> There is an easier way around this. Most shells, bash included will
>> exclude a line from the history if you begin it with a space.
>
> My bash doesn't do this. It includes the line in the history :(
>
> but
>
> HISTSIZE=2000
> SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
>
> might have an effect on this behaviour.
Ah, my default bashrc has HISTCONTROL set.
~$ echo $HISTCONTROL
ignoreboth
This sets ignorespace and ignoredups, see the man page for details.
cheers,
Owen.