Welcome to LQ!
Quote:
Originally Posted by gilbertodasilvaung
Finally I got a long list including OS windows and linux. Could I set any if clause to get only linux OS in all subnet and output as a csv?
Moreover, other question about awk, could I have the display format that just retrieve IP hostname and OS ?
|
The answer to all is of course, yes - you can filter and format the output data stream just about any way you want!
Awk is often the tool of choice for such operations, so you are on the right track! Getting the desired data selections is all about
field separators,
record separators and
matching expressions which are most often given as
regular expressions. So searching for those terms and review of the awk documentation (man awk) will get you started.
I am not familiar enough with namap options and output to offer any specific tips, but perhaps others with that knowledge will offer their advice.
LQ is all about sharing knowledge and getting help with specific problems, not so much about giving/getting complete working code. So you will get more active participation in your threads and more specific replies when you research the task yourself and try to work out a solution, then ask questions about specific things that you cannot figure out and show us what you have already tried.
You may want to review the
Site FAQ for guidance in posting your questions and general forum usage. Especially, read the link in that page,
How To Ask Questions The Smart Way. The more effort you put into understanding your problem and framing your questions, the better others can help!
Good luck!