The grep utility is not needed. Awk can do it all:
netstat -rn | awk '/default/ {print $2}'
192.168.128.1
Note that if you have something like Parallels (or a VPN, or both) running, you may see two or more default routing entries - it will be true if you use the 'grep' suggestion above, too.
netstat -rn | awk '/default/ {print $2}'
192.168.128.1
link#12
and
netstat -rn | awk '/default/ {print $2}'
utun1
192.168.128.1
link#12
To set a variable (_default) for further use (assuming only one entry for 'default') .....
_default=$( netstat -rn inet | awk '/default/ {print $2}' ) # I prefer $( ... ) over back-ticks
In the case of multiple default routes use:
netstat -rn | awk '/default/ {if ( index($6, "en") > 0 ){print $2} }'
192.168.128.1
These examples tested in Mavericks Terminal.app and are specific to OSX only. For example, other *nix versions frequently use 'eth' for ethernet/wireless connections, not 'en'. This is also only tested with ksh. Other shells may need a slightly different syntax.