Re: script/history
On Sun 04/02/2024 at 11:28, Michael Grant <mgrant@grant.org> wrote:
>> $ 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.
>
> So this might surprise you but the commands are actually in the
> history list! But not in the current shell.
So they are :)
Thanks
G
Reply to: