title: Extracting specific nmap output in bash
body: <p>I'm getting following nmap output from a scan:</p>
  <pre><code>PORT     STATE  SERVICE
  113/tcp  closed ident
  443/tcp  open   https
  5060/tcp open   sip
  </code></pre>
  <p>I want to extract only open ports and save them into a variable while my script progress is below:</p>
  <pre><code>#!/bin/bash
  echo Please enter your IP/domain address for nmap vulnerability scanning:
  read IP
  echo Your results against $ip will be output in sometime
  nmap -sS -oG output.txt $ip
  </code></pre>