# defaults read com.apple.Safari | grep -i com.apple.WebKit.searchField: # open $HOME/Library/Preferences/com.apple.Safari.plist # put the following function into ~/.bash_login function dws() { if [[ ! -e "$HOME/Library/Preferences/com.apple.Safari.plist" ]]; then printf "There is no com.apple.Safari.plist file in $HOME/Library/Preferences\x21\n" return 1 fi defaults read com.apple.Safari | sed -En -e "s/^[[:space:]]*\"(com.apple.WebKit.searchField:.*)\" = .*$/\1/p" | while read item; do #printf -- "$item\n" defaults delete com.apple.Safari "$item" 2>/dev/null done return 0 }