add comment lines(#) support in subnets_user_list.txt

This commit is contained in:
vvzvlad 2022-08-25 16:59:10 +03:00
parent 3f07a5d3b5
commit 286c22df26

View File

@ -29,7 +29,7 @@ cat $file_raw |grep "-" > $file_for_calc
cat $file_raw |grep -v "-" > $file_processed cat $file_raw |grep -v "-" > $file_processed
for line in $(cat $file_for_calc); do ipcalc $line |grep -v "deaggregate" >> $file_processed; done for line in $(cat $file_for_calc); do ipcalc $line |grep -v "deaggregate" >> $file_processed; done
if [ -e $file_user ]; then echo "Add user subnets..."; cat $file_user >> $file_processed; fi if [ -e $file_user ]; then echo "Add user subnets..."; cat $file_user |grep -v "#" >> $file_processed; fi
#Flush route table #Flush route table
echo "Flush route table (down interface $interface)..." echo "Flush route table (down interface $interface)..."