Script search-wiki

lollo78 Jun 11th, 2018 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. lang=$(echo $1 | cut -f1 -d '-')
  3. text=$2
  4. query=${text// /_}
  5. json=$(curl -sS "https://$$query&limit=1&namespace=0&format=json")
  6. descrquote=$(echo $json | sed -r 's/([^,]*,){2}//' | cut -f1 -d ']')
  7. descr=${descrquote//\"/}
  8. echo "Msg:"${descr//[/}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand