Commit | Line | Data |
---|---|---|
8462ced4 H |
1 | #!/bin/bash |
2 | gen_line() { | |
3 | echo -e '\t"'$(traceroute -q1 -w2 -z500 "$1" 2>/dev/null | cut -d ' ' -f-4 | grep -C 1 -o '[0-9a-zA-Z\.-\_]*' | grep -v '^[0-9]*$' | sed -e ':a;N;$!ba;s/\n/" -> "/g')'"' | | |
4 | #grep -v '*' | | |
5 | grep '\->' | grep -v '""' | |
6 | } | |
7 | export -f gen_line; | |
8 | ||
9 | echo 'strict digraph G {' | |
10 | time cat ~/Temp/hosts/hostsbrevnov/hosts | sort -u | grep ^[0-9] | cut -f 1 | | |
11 | xargs -n 1 -P 200 bash -c 'gen_line "$@"' -- | |
12 | echo '}' |