bgp-lastseen.sh 161 B

123456789
  1. #!/bin/sh
  2. now=$(date +%s)
  3. birdc 'show route' | grep "^[0-9]" | cut -d ' ' -f 1 | while read prefix
  4. do
  5. echo "$prefix" "$now"
  6. done > /tmp/bgp_dn42_lastseen