提取数据

#!/bin/bash
todaySecond=$(date -d $(date -d today +%Y%m%d ) +%s)000
yesterdaySecond=$(date -d $(date -d yesterday +%Y%m%d ) +%s)000


echo $todaySecond
echo $yesterdaySecond


words="{
\"from\":1,
\"size\":50000,
\"sort\": [
{
      \"createTime\": {
         \"order\": \"asc\"
      }
   }
], 
  \"query\": {
    \"bool\": {
      \"must\": [
        {
          \"range\": {
            \"createTime\": {
              \"gt\": \"$yesterdaySecond\",
              \"lt\": \"$todaySecond\"
            }
          }
        }
      ]
    }
  },
  \"fields\": [
     \"nickname\",
     \"phone\",
     \"createTime\"
  ]
}"


execute="curl -XGET "http://172.17.20.96:29200/ynactivity-info/charge/_search" -d' $words ' "


eval $execute > /home/wechat/bin/executeYunnan/software/today.txt


java -jar /home/wechat/bin/executeYunnan/software/JsonTool.jar "/home/wechat/bin/executeYunnan/software/today.txt" "/home/wechat/bin/executeYunnan/software"




sh /home/wechat/bin/executeYunnan/software/execute-yunnna-v3.sh 1>/dev/null 2>&1


0 3 * * * /bin/sh /home/wechat/bin/executeYunnan/software/execute-yunnna-v3.sh 1>/dev/null 2>&1

你可能感兴趣的:(提取数据)