I am using netcat to test if remote exchange server (lets call it exchange1) is online with this code.
nc -w 3 192.168.130.17 25
I want to create a file that has that servers name if and only if the netcat scan receives a response of '220 SMTP Server Ready', meaning exchange1 is online. If there is no response, I don't want to write the name to the file because it is offline.
- What is this called. I believe it to be a type of command result filtering but having trouble finding any articles about how its done.
- Can someone provide a simple example of this so I can learn from it.