Skip to content

Commit

Permalink
v1.0.8优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
larsonzh committed Dec 12, 2022
1 parent 4c40efc commit 96cf4a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions release/lzrules/lzrules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ get_ipv4_data_file_item_total() {
retval="$( sed -e '/^[ \t]*[#]/d' -e 's/[#].*$//g' -e 's/[ \t][ \t]*/ /g' -e 's/^[ ]//' -e 's/[ ]$//' -e '/^[ ]*$/d' "${1}" 2> /dev/null \
| awk -v count="0" '$1 ~ /^([0-9]{1,3}[\.]){3}[0-9]{1,3}([\/][0-9]{1,2}){0,1}$/ \
&& $1 !~ /[3-9][0-9][0-9]/ && $1 !~ /[2][6-9][0-9]/ && $1 !~ /[2][5][6-9]/ && $1 !~ /[\/][4-9][0-9]/ && $1 !~ /[\/][3][3-9]/ \
&& $1 != "0.0.0.0/0" \
&& NF >= "1" {count++} END{print count}' )"
}
echo "${retval}"
Expand Down

0 comments on commit 96cf4a3

Please sign in to comment.