On OS X is it possible to override DHCP assigned DNS servers but still keeping them for fallback?
You can use ipconfig getpacket to find the DNS server that DHCP recommended:

$ ipconfig getpacket en0 
...
domain_name_server (ip_mult): {192.168.3.2, 192.168.42.1}
...


So, assuming you are using the Wi-Fi adapter and its device is en0, you can:

#!/bin/bash

default_servers=$( ipconfig getpacket en0 | \
   perl -ne'/domain_name_server.*: \{(.*)}/ &amp;&amp; print join " ", split /,\s*/, $1' )
networksetup -setdnsservers Wi-Fi 127.0.0.1 $default_servers