# Logstash\_1.4.2 : add double quote with grok

**URL:** https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981
**Category:** Logstash
**Created:** [November 6, 2015, 11:21am UTC](https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981 "2015-11-06T11:21:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![florian.dhaussy](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@florian.dhaussy](https://discuss.elastic.co/u/florian.dhaussy)
#### Post date: [November 6, 2015, 11:21am UTC](https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981/1 "2015-11-06T11:21:11Z")

</div>

Hi,

I'm actually trying to generate a csv file, for a GeoIP database.

My goal is to have this:

```
"startIpNum","endIpNum","locId"

```

And i actually have this, without the double quotes:

```
startIpNum,endIpNum,locId

```

How to add the double quotes ? I try to escape them, but i obtain this:

```
"\"""startIpNum"\""","\"""endIpNum"\""","\"""locId"\"""

```

I try with single quote, but i obtain this :

```
"""startIpNum""","""endIpNum""","""locId"""

```

For info, here is my grok filter, where i generate the field :

```
add_field => { "startIpNum" => "%{store_net}1" }

```

Thanks for your time !

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [November 6, 2015, 11:35am UTC](https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981/2 "2015-11-06T11:35:20Z")

</div>

Are you using the csv output? Please show a minimal configuration example that exhibits your problem. I don't understand what the grok filter has to do with creating a CSV file.

---

<div class="post-metadata">

### Author: ![florian.dhaussy](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@florian.dhaussy](https://discuss.elastic.co/u/florian.dhaussy)
#### Post date: [November 6, 2015, 11:38am UTC](https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981/3 "2015-11-06T11:38:23Z")

</div>

Yes, it's a csv output:

```
output {
  csv {
    fields => ["startIpNum", "endIpNum", "locId"]
    path = "/my/path/to/output.csv"
  }
}
```

---

<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, 5:23am UTC](https://discuss.elastic.co/t/logstash-1-4-2-add-double-quote-with-grok/33981/4 "2017-07-06T05:23:39Z")

</div>


