# Curl in bash

**URL:** <https://discuss.elastic.co/t/curl-in-bash/6887>\
**Category:** Elasticsearch\
**Created:** [March 5, 2012, 8:17am UTC](https://discuss.elastic.co/t/curl-in-bash/6887 "2012-03-05T08:17:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goog\_Jobs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/goog_jobs/32/2894_2.png) [@Goog\_Jobs](https://discuss.elastic.co/u/Goog_Jobs)\
**Post date:** [March 5, 2012, 8:17am UTC](https://discuss.elastic.co/t/curl-in-bash/6887/1 "2012-03-05T08:17:54Z")

</div>

Hi, people!

curl -XGET 'localhost:9200/tapirwiki/tapirwiki/\_search' -d '{  
"fields" : ["title"],  
"query" : {  
"query\_string" : {  
"query" : "\*"  
}  
}  
}'\>\>t.txt

how the pass the data from curl to a variable in bash ?  
is there a function which help to find a substring and reture false or ture?

---

<div class="post-metadata">

**Author:** ![Paul\_Loy](https://avatars.discourse-cdn.com/v4/letter/p/ad7895/32.png) [@Paul\_Loy](https://discuss.elastic.co/u/Paul_Loy)\
**Post date:** [March 5, 2012, 8:35am UTC](https://discuss.elastic.co/t/curl-in-bash/6887/2 "2012-03-05T08:35:54Z")

</div>

really not the place to ask bash questions. Try google search:

> **[LMGTFY - Let Me Google That For You](https://lmgtfy.app/?q=bash%2Bassigning%2Bvariables)**
>
> For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.

On Mon, Mar 5, 2012 at 12:17 AM, Goog Jobs [googcheng@gmail.com](mailto:googcheng@gmail.com) wrote:

> Hi, people!
> 
> curl -XGET 'localhost:9200/tapirwiki/tapirwiki/\_search' -d '{  
> "fields" : ["title"],  
> "query" : {  
> "query\_string" : {  
> "query" : "\*"  
> }  
> }  
> }'\>\>t.txt
> 
> how the pass the data from curl to a variable in bash ?  
> is there a function which help to find a substring and reture false or  
> ture?

## --

Paul Loy  
[paul@keteracel.com](mailto:paul@keteracel.com)  
[http://uk.linkedin.com/in/paulloy](http://uk.linkedin.com/in/paulloy)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:37am UTC](https://discuss.elastic.co/t/curl-in-bash/6887/3 "2017-07-06T03:37:23Z")

</div>


