mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
9 lines
368 B
Bash
Executable file
9 lines
368 B
Bash
Executable file
#! /bin/sh
|
|
#
|
|
# Returns a grep pattern for matching the IP addresses of the given hosts.
|
|
# Note that generally when using the pattern you should surround it with
|
|
# some form of anchoring, such as blanks, to avoid false hits.
|
|
|
|
sheesh=`(for i do host-to-addrs $i; done)`
|
|
if [ "$sheesh" = "" ]; then exit 1; fi;
|
|
echo "$sheesh" | xargs | sed 's/\./\\./g;s/ /|/g;s/.*/(&)/'
|