Capture real-time console output to a file for live monitoring in a text editor using shell redirection on Linux, macOS, or Windows.