A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.
Hello everyone. I have a script that telnets into a linux workstation and restarts a service, while logging the session to a file. I'm kind of new to linux so when I was using windows I would capture something like
windows cli: telnet xxx.xxx.xxx.xxx -f c:/capture.log
[me@remote]# /sbin/service dhcpd restart
Shutting down dhcpd: OK]
Starting dhcpd: OK]
Now when using the linux telnet client I capture something like
It looks like the telnet session is passing control characters or something like that to the log file, which messes up some scripts that check whether the service was succesfully restarted.
I've already tried playing around with the telnet mode (line vrs char) with no effect. Any ideas on how to get the log with just plain text?
Thanks for any advice and sorry if I posted in the wrong place.