gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
how can i make bat cmd output to output.txt 1. telnet 10.10.10.10 2. input username user…
- User
how can i make bat cmd output to output.txt
- telnet 10.10.10.10
- input username user
- input password password
- input cd %LOGBATCH
- grep scm mon.!mm!!dd!
- exit
- Assistant
To capture the output of a batch command in Windows Command Prompt (CMD) into a file called
output.txt, you can use redirection. However, telnet commands and interactive inputs may not directly support simple redirection. Instead, you can create a batch file to automate the process and capture the output.Here’s a potential method you can use, which utilizes echo commands and a temporarily created script for telnet:
- Create a batch file (e.g., ) with the following content: