Re: script/history

2024-02-04 Thread Gareth Evans
On Mon 05/02/2024 at 00:45, Greg Wooledge wrote: ... > If you're one of these "I want every command I ever run to be in my > shell history, retained forever, and I don't care how much space it > takes" people, then there are web pages out there that can help you. > I don't follow that philosophy

Re: script/history

2024-02-04 Thread Gareth Evans
(Re)posting the below as requested, and can confirm history -r seems to have the desired effect. Thanks. - Original message - From: Will Mengarini To: Gareth Evans Cc: debian-user@lists.debian.org Subject: Re: script/history Date: Monday, 5 February 2024 01:02 * Gareth Evans [24

Re: script/history

2024-02-04 Thread Will Mengarini
* Gareth Evans [24-02/04=Su 09:46 +]: > Re the script command, does anyone know of a way to make > commands run during a script session appear in bash history too? You want the 'history -r' command, "explained" by `help history`. After you end the script, you're back in the bash instance

Re: script/history

2024-02-04 Thread Greg Wooledge
On Mon, Feb 05, 2024 at 12:28:38AM +, Gareth Evans wrote: > I was trying to view the history of commands run during a script session. > > user@qwerty:~$ script foo > Script started, output log file is 'foo'. > user@qwerty:~$ date > Mon 5 Feb 00:21:16 GMT 2024 > user@qwerty:~$ exit > exit >

Re: script/history

2024-02-04 Thread Gareth Evans
On Sun 04/02/2024 at 19:45, David Wright wrote: ... > According to this man page for csh (but includes tcsh): > > https://linux.die.net/man/1/csh > > the "a" that modifies modifiers is a "[feature] of tcsh not found > in most csh(1) implementations (specifically, the 4.4BSD csh)". It > appears

Re: script/history

2024-02-04 Thread Gareth Evans
On Sun 04/02/2024 at 17:33, Greg Wooledge wrote: ... > The script(1) utility has NOTHING to do with running ordinary shell > scripts. I understand that. I was trying to view the history of commands run during a script session. user@qwerty:~$ script foo Script started, output log file is 'foo'.

Re: script/history

2024-02-04 Thread Greg Wooledge
On Sun, Feb 04, 2024 at 01:45:27PM -0600, David Wright wrote: > SCRIPT(1) User Commands SCRIPT(1) > [ … ] > HISTORY >The script command appeared in 3.0BSD. > > I have no idea why "the history mechanism" is even mentioned > in the man page for script. It

Re: script/history

2024-02-04 Thread David Wright
On Sun 04 Feb 2024 at 16:01:29 (+), Gareth Evans wrote: > On Sun 04/02/2024 at 13:24, Max Nikulin wrote: > > On 04/02/2024 16:46, Gareth Evans wrote: > >> Re the script command, does anyone know of a way [ … ] > > [...] > >> man script says > >> > >> "SEE ALSO > >> csh(1) (for the

Re: script/history

2024-02-04 Thread Greg Wooledge
On Sun, Feb 04, 2024 at 04:01:29PM +, Gareth Evans wrote: > It seemed to me initially (as I should perhaps have stated) that man script > was suggesting that csh was a component or depedency (of script), which > seemed to be contradicted by it not being installed. On reflection, >

Re: script/history

2024-02-04 Thread Gareth Evans
On Sun 04/02/2024 at 13:24, Max Nikulin wrote: > On 04/02/2024 16:46, Gareth Evans wrote: >> Re the script command, does anyone know of a way to make commands run during >> a script session appear in bash history too? > [...] >> man script says >> >> "SEE ALSO >> csh(1) (for the history

Re: script/history

2024-02-04 Thread hw
Oh you're right, I entirely overlooked the usage of 'script' and didn't understand the question right, sorry. On Sun, 2024-02-04 at 06:28 -0500, Michael Grant wrote: > > $ script foo.txt > > Script started, output log file is 'foo.txt'. > > $ date > > Sun 4 Feb 09:44:00 GMT 2024 > > $ exit > >

Re: script/history

2024-02-04 Thread Max Nikulin
On 04/02/2024 16:46, Gareth Evans wrote: Re the script command, does anyone know of a way to make commands run during a script session appear in bash history too? [...] man script says "SEE ALSO csh(1) (for the history mechanism)" but $ man csh No manual entry for csh echo

Re: script/history

2024-02-04 Thread Greg Wooledge
On Sun, Feb 04, 2024 at 09:46:09AM +, Gareth Evans wrote: > man script says > > "SEE ALSO >csh(1) (for the history mechanism)" > > but > > $ man csh > No manual entry for csh I'm so glad that we're entering an era where it's normal *not* to have csh installed and used. That shell

Re: script/history

2024-02-04 Thread Michael Grant
> $ script foo.txt > Script started, output log file is 'foo.txt'. > $ date > Sun 4 Feb 09:44:00 GMT 2024 > $ exit > exit > Script done. > $ history|tail -n2 > 30797 2024-02-04 09:43:57 script foo.txt > 30798 2024-02-04 09:44:21 history|tail -n2 > > I did try to search on this but just got

Re: script/history

2024-02-04 Thread hw
On Sun, 2024-02-04 at 09:46 +, Gareth Evans wrote: > Re the script command, does anyone know of a way to make commands > run during a script session appear in bash history too? Maybe this:

script/history

2024-02-04 Thread Gareth Evans
Re the script command, does anyone know of a way to make commands run during a script session appear in bash history too? $ script foo.txt Script started, output log file is 'foo.txt'. $ date Sun 4 Feb 09:44:00 GMT 2024 $ exit exit Script done. $ history|tail -n2 30797 2024-02-04 09:43:57