Last active
August 29, 2015 13:58
-
-
Save wbingli/9962060 to your computer and use it in GitHub Desktop.
Append a search path to /etc/resolv.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ! grep -q 'test.com' /etc/resolv.conf | |
then | |
sed -i "s/`grep search /etc/resolv.conf`/`grep search /etc/resolv.conf` test.com/" /etc/resolv.conf | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment