summaryrefslogtreecommitdiff
path: root/.local/bin/macos.d/routetable
blob: e4589d1ac25f4e3dab0068a3abc9d662aa06f8dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
ECHO_LINE=y
netstat -rn 2>&1 |
while read -r line
do
    case "$line" in
        "Internet6"*) unset ECHO_LINE ;;
        "Routing tables"*|"Internet"*) : ;;
        *[![:space:]]*) if [ "${ECHO_LINE}" ]
                        then echo "$line"
                        fi
                        ;;
    esac
done