From a bash script how can I quickly find out whether a port 445 is open/listening on a server.
445
I have tried a couple of options, but I want something q
Here's one that works for both Mac and Linux:
netstat -aln | awk '$6 == "LISTEN" && $4 ~ "[\\.\:]445$"'