How to save output of REPL terminal in VS code

You may take a look at this post