Re: Saving command history for non-interactive shell

2012-03-19 Thread Chet Ramey
On 3/19/12 8:39 AM, Greg Wooledge wrote: > On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: >> Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you >> like. You can probably set some of the right variables in .ssh/environment >> and set BASH_ENV to a file that wil

Re: Saving command history for non-interactive shell

2012-03-19 Thread dethrophes
Am 19.03.2012 13:39, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: There is nothing stopping you from using history in a non-interactive shell -- it's just not enabled by default. Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you lik

Re: Saving command history for non-interactive shell

2012-03-19 Thread Greg Wooledge
On Fri, Mar 16, 2012 at 06:15:35PM -0400, Chet Ramey wrote: > There is nothing stopping you from using history in a non-interactive > shell -- it's just not enabled by default. > > Turn on history with `set -o history' and set HISTFILE and HISTSIZE as you > like. You can probably set some of the

Re: Saving command history for non-interactive shell

2012-03-17 Thread dethrophes
Am 17.03.2012 22:10, schrieb dethrophes: Am 16.03.2012 15:56, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving command

Re: Saving command history for non-interactive shell

2012-03-17 Thread dethrophes
Am 16.03.2012 15:56, schrieb Greg Wooledge: On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving commands invoked via ssh vs shell scrpts. From C

Re: Saving command history for non-interactive shell

2012-03-16 Thread Chet Ramey
On 3/16/12 12:39 PM, Lars Peterson wrote: > Thanks Greg. > > I get what you're saying about the futility of recording everything users do. > And I'm not interested in setting up a big brother / spy machine that will > invoke the wrath of the Unix gods. > > I'm not interested in security here...

RE: Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Peterson Cc: bug-bash@gnu.org Subject: Re: Saving command history for non-interactive shell On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: > Is there a way to configure bash so that commands from a > non-interactive shell are preserved in the history? I'm more > inte

Re: Saving command history for non-interactive shell

2012-03-16 Thread Greg Wooledge
On Fri, Mar 16, 2012 at 02:33:35PM +, Lars Peterson wrote: > Is there a way to configure bash so that commands from a non-interactive > shell are preserved in the history? I'm more interested in saving commands > invoked via ssh vs shell scrpts. >From CHANGES, for bash 4.1: l. There is a new

Saving command history for non-interactive shell

2012-03-16 Thread Lars Peterson
Hello, Is there a way to configure bash so that commands from a non-interactive shell are preserved in the history? I'm more interested in saving commands invoked via ssh vs shell scrpts. I did not succeed when trying a few things to "force" interactive mode such as: # invoke bash as a login s