echo -e "${PACKETS[2]}\t$(( ${BYTES[2]} / 1000 ))\tInvalid/rejected IHL IPv4 field"
echo -e "${PACKETS[3]}\t$(( ${BYTES[3]} / 1000 ))\tRejected IPv6 fragments"
C=4
- while read LINE; do
- echo -e "${PACKETS["$C"]}\t$(( ${BYTES["$C"]} / 1000 ))\t$LINE"
- C=$(( $C + 1 ))
- done < "$(dirname ${BASH_SOURCE[0]})/installed-rules.txt"
+ if [ "$(wc -l "$(dirname ${BASH_SOURCE[0]})/installed-rules.txt")" != "0" ]; then
+ while read LINE; do
+ echo -e "${PACKETS["$C"]}\t$(( ${BYTES["$C"]} / 1000 ))\t$LINE"
+ C=$(( $C + 1 ))
+ done < "$(dirname ${BASH_SOURCE[0]})/installed-rules.txt"
+ fi
}