I would like to use netcat to test if some ports are listening or not but, since the command will be executed in machines that will have languages different than English, it’s not a great idea to grep
its output based on the word LISTENING
(for example, I saw on a German pc the word ABHOREN
).
I tried to look at the manpages for netcat, but I can’t seem to find a solution for that, so I was wondering if anybody ever managed to translate the status of the port into a numerical format, rather than a string.
Thanks in advance 🙂