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
nc -l 8000
Where 8000 is the port number. If the port is free, it will start a server that you can close easily. If it isn't it will throw an error:
nc: Address already in use