Execute simple script
Instead of .bat, save it as .command.

A .command file will run the contents of the file in Terminal upon double-click, just like a .bat would do on Windows.

If you can't run the file because you don't have permission to execute the command file, you need to set 'execute' on the file for it to allow you to run it:

chmod u+x /path/to/file.command


u is the owner of the file, +x adds 'execute', so u+x gives the owner of the file the ability to execute it

And to the the commands as admin, OS X always requires you to put in the admin password. For your script, the easiest way to do this, is to run the script as an admin user and change the script to the following:

sudo route -n add 192.168.0.0/20 192.168.224.1
sudo route -n delete 0.0.0.0
sudo route -n add 0.0.0.0 172.20.10.1


sudo stands for Substitute User DO and runs as root by default. It is likely sudo will ask for your password.