2 ms·
"kids these days huh" :) You can save what you type with the 'script' command. script test_session Will save everything you type and their output to the
by raverbashing 4y ago
"kids these days huh" :)
You can save what you type with the 'script' command.
script test_session
Will save everything you type and their output to the test_session file until you exit the shell with Ctrl-D
Look up "man script" for more details (funny it mentions 'typescript' but it is not that typescript)
(and while I joke about 'kids these days' I learned this from the UNIX greybeards so there's that as well)
- sureshssarda 4y agoThis will not let you 'bookmark' selected commands which you can run later. I understand we can of course create aliases or small utility scripts, but having a place where we can just store these frequent commands is quite helpful especially with Docker, K8s or Azure/AWS CLI where commands are quite long to type and remember.
- raverbashing 4y ago> I understand we can of course create aliases or small utility scripts, but having a place where we can just store these frequent commands But that's exactly what an alias is. Put it on a script that you source when loading the terminal and there you have it Or you could have a "commands.txt" where you copy/paste commands Though yeah, maybe there should be a better solution (well, you can always look back history as well)
- albert_e 4y agoThanks -- this is useful to know. Appreciate the pointer. however, I am hoping for something that is far more interactively editable (like going up a couple of cells, editing and re running them in context) and also allows annotations / markdown / hyperlinks etc interspersed among the cells PS: I am also on Windows a lot of time