docs
[mirrors/Programs.git] / bash / hostsviz / hostsviz.sh
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 '}'
This page took 0.306617 seconds and 4 git commands to generate.