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

script/history



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  script foo.txt
30798  2024-02-04 09:44:21  history|tail -n2

I did try to search on this but just got lots of "bash history" and "history in bash script" references.

man script says 

"SEE ALSO
       csh(1) (for the history mechanism)"

but

$ man csh
No manual entry for csh

Thanks
Gareth


Reply to: