Варианты с помощью утилиты egrep:
egrep -v "^\s*(#|$)" /etc/network/interfaces
egrep -v "^[[:space:]]*#|^$" /etc/network/interfaces