Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

when I run:

nmap --open -sT -p 5900,3389 -oG test

This outputs to console:

Starting Nmap 5.00 ( ) at 2013-02-15 16:31 PST
Interesting ports on
Not shown: 1 filtered port
3389/tcp open  ms-term-serv
MAC Address: 00:0C:29:E1:16:55 (VMware)

And this outputs to test:

# Nmap 5.00 scan initiated Fri Feb 15 16:31:56 2013 as: nmap --open -sT -p 5900,3389 -oG test 
Host: () Ports: 3389/open/tcp//ms-term-serv///   Ignored State: filtered (1)
# Nmap done at Fri Feb 15 16:31:57 2013 -- 1 IP address (1 host up) scanned in 1.52 seconds

I want to run awk on the output to the console not from the file. It seems like for everyone else it outputs to to console. I don't know why this isn't working for me.

Running nmap 5.000

share|improve this question

As a special case, a file name of - can be used to send the Grepable output to the console instead of the normal output.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.