This is my first question on stackoverflow! I want to have a unix script that will run grep on the console output. Here is what my script does: 1. Telnet into a remote server (I have done this part successfully) 2. On successful login, the remote server displays outputs information on the console. I need to run grep on that console output (need help with this)
So, I need a script to run grep on the output appearing on the console.
Any thoughts??
Thanks, Puneet
Use SSH instead. It's more secure and far easier to script.
ssh remoteusername@remotehost:/path/to/remote/script | grep 'something'
with appropriate key setup, it won't even prompt you for a password.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With