route add default gw mango-gw
adds a default route (which will be used if no other route matches). All packets using this route will be gate-
wayed through "mango-gw". The device which will actually be used for that route depends on how we can reach
"mango-gw" - the static route to "mango-gw" will have to be set up before.
You can substitute a name for the gateway, but that one has to be set up as well.
I would rather write a shell script for all those commands and replacing the gateway IP with the first input parameter, even if it's only that "mango-gw" name.
If the gateway router has an internal web serving applications, then you could iterate through the entire subnet and check/scrape for any web output to find out which IP has the gateway. Needs a shell script. Gateways are often among the first or last entries in the range.