Вывести только ip в nmap в bash

Discussion in 'Linux, Freebsd, *nix' started by tester_new, 3 Apr 2012.

  1. tester_new

    tester_new Elder - Старейшина

    Joined:
    12 Feb 2012
    Messages:
    300
    Likes Received:
    45
    Reputations:
    24
    Здравствуйте... вообщем интересует самое простое решение(регулярное выражение) вывода ТОЛЬКО ip адресов из вывода сканера nmap (nmap под bash)

    желательно проверенное :)
     
  2. mironich

    mironich Elder - Старейшина

    Joined:
    27 Feb 2011
    Messages:
    733
    Likes Received:
    73
    Reputations:
    19
    Code:
    nmap | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'
     
    #2 mironich, 3 Apr 2012
    Last edited: 3 Apr 2012
    1 person likes this.
  3. tester_new

    tester_new Elder - Старейшина

    Joined:
    12 Feb 2012
    Messages:
    300
    Likes Received:
    45
    Reputations:
    24
    спасибо