Skip to content

Instantly share code, notes, and snippets.

@mago0
Created August 7, 2012 21:43
Show Gist options
  • Save mago0/3289623 to your computer and use it in GitHub Desktop.
Save mago0/3289623 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -ne 4 ]; then
echo "Usage: $0 <'password'> <index> <field> <value>"
fi
password=$1
index=$2
field=$3
value=$4
curl -k --user admin:$password -XGET "https://SERVER/${index}/_search?pretty=1" -d "{ query : { term : { $field : $value } } }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment