Skip to content

Instantly share code, notes, and snippets.

@1ntEgr8
Created January 8, 2020 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ntEgr8/2ef02ee1e351d50ccdf4c40ecb685edf to your computer and use it in GitHub Desktop.
Save 1ntEgr8/2ef02ee1e351d50ccdf4c40ecb685edf to your computer and use it in GitHub Desktop.
search duckduckgo from a terminal
#!/usr/bin/env bash
if [ $# -ge 1 ]
then
query=$(sed 's/ /+/g' <<< $(sed 's/"/\"/g' <<< $1))
open "https://www.duckduckgo.com/?q="$query
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment