1 2 3 4 5 6 7 8 9
#!/bin/sh # Only supports reading from stdin iface="$1" # ignored while read src dst ; do sed -i -e "/^${dst} ${src}\$/d" "$FAKE_NETSTAT_TCP_ESTABLISHED_FILE" done