Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
To me the syntax of the port argument is invalid and no standard output is piped to awk. Looking at the man page of nc, they don't specify you can use a comma to separate the list of ports to scan.
This is just one example with comma . My problem is output of nc command.
This output not parse with awk.
Quote:
Originally Posted by colucix
To me the syntax of the port argument is invalid and no standard output is piped to awk. Looking at the man page of nc, they don't specify you can use a comma to separate the list of ports to scan.
The problem cannot be awk, but what passes through the pipe as standard output. Some commands send terminal output to standard error, so that a redirection is needed, but nc is not one of these. What do you get by running the nc command alone (without piping to awk)?
The problem cannot be awk, but what passes through the pipe as standard output. Some commands send terminal output to standard error, so that a redirection is needed, but nc is not one of these. What do you get by running the nc command alone (without piping to awk)?
... running command alone will not allow me to parse the output.
... running command alone will not allow me to parse the output.
Hi,
That wasn't the question colucix asked. He was asking you what the output of the nc command is (without the pipe). Run the nc command without piping it and post the output. I'm kind of sure that you'll need to put a space after the comma (at least on my Debian I had to). If I don't have a space after the comma only the first port queried gives output, disregarding the rest. With a space I get all ports from a list. Next we'll worry about the output filtering.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.