1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Fix duplicated output produced by scutil

This commit is contained in:
lucus 2018-06-04 20:58:44 +09:00 committed by Chris Cummer
parent 67f48b6f7c
commit 0c07a26708

View File

@ -42,7 +42,7 @@ func dnsLinux() []string {
}
func dnsMacOS() []string {
cmdString := `scutil --dns | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'`
cmdString := `scutil --dns | head -n 7 | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'`
cmd := exec.Command("sh", "-c", cmdString)
out := wtf.ExecuteCommand(cmd)