Here is a better and inbuilt way of storing MobaXterm command line output.
How to save terminal screen output of Mobaxterm?
- Go to the opened tab which you want to save the screen logs
- Right click on the tab
- From the pop-up menu, click on the Save terminal output option
- When prompted, where to save your file, select an appropriate location, choose file name and file type
- Plain text type will be a simple text file
- Whereas Rich Text Document will save the formatting of screenlog including color.