0
我有我已放置在一個外殼腳本elasticsearch curl命令如下:怪異輸出,同時在外殼腳本中放置elasticsearch curl命令
#!/bin/bash
totalCount=`curl -XGET 'http://localhost:9200/_all/_count?pretty=true' -d '{
"query" : {
"bool" : {
"must" : [
{
"match" : {
"type" : "mtaLogs"
}} ,
{
"filtered" : {
"filter" : {
"range" : {
"@timestamp" : {
"from" : "2015-07-27T00:00:01",
"to" : "2015-07-27T23:59:59"
}
}
}
}
}
]
}
}
}' | jq '.count'`
echo "Total mtaLogs count is $totalCount"
現在假定,以顯示輸出只作爲Total mtaLogs count is <some count>
但它顯示輸出爲
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 98 0 98 0 755 7572 58337 --:--:-- --:--:-- --:--:-- 0
Total mtaLogs count is 39
爲什麼我在控制檯上得到這個不必要的表輸出?
這裏有什麼幫助嗎?
謝謝..它幫助... :) –