with a piece of sh+awk based on a recent post to freebsd-arch by Cyrille Lefevre <cyrille.lefevre@laposte.net>.