Skip to content

Instantly share code, notes, and snippets.

@fortitudepub
Last active February 8, 2017 10:52
Show Gist options
  • Save fortitudepub/ad3be9419782c454012c12985f3807e8 to your computer and use it in GitHub Desktop.
Save fortitudepub/ad3be9419782c454012c12985f3807e8 to your computer and use it in GitHub Desktop.
shell generate routes
#!/bin/sh
i=1
while (( i <= 100000 ))
do
echo "generate route $i ..."
c2=$(( (i/(255*255))%255 ))
c3=$(( (i/255)%255 ))
c4=$(( i%255))
`ip route del 222.$c2.$c3.$c4 dev lo`
i=$(( i+1 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment