# Issues with using grep in Drone Pipeline

**URL:** <https://drone.discourse.group/t/issues-with-using-grep-in-drone-pipeline/4104>\
**Category:** Drone Support\
**Created:** [March 19, 2020, 9:39pm UTC](https://drone.discourse.group/t/issues-with-using-grep-in-drone-pipeline/4104 "2020-03-19T21:39:37Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lo\_ronk](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/lo_ronk/32/5519_2.png) [@lo\_ronk](https://drone.discourse.group/u/lo_ronk)\
**Post date:** [March 19, 2020, 9:39pm UTC](https://drone.discourse.group/t/issues-with-using-grep-in-drone-pipeline/4104/1 "2020-03-19T21:39:37Z")

</div>

Hello,

I am having some issues with drone parsing a `grep` command in my pipeline. Essentially, I am using grep to pull a version number of one of my container images in order to promote the image from dev -\> stage and eventually stage-\>prod. I am doing this through `gcloud`. My command to grab the image using `gcloud` syntax is:

` gcloud container images list-tags <my-image-repository> --filter="tags:latest" --format="table[noheading](tags)" | grep -o '\bv\w*.*'`

This command parses the correct information when I log directly into the docker container that I am using to execute this step, however, when I run it with Drone it appears to yank the `\b` from my grep command completely. I tested this with a pipeline by just running `grep -o '\bv\w*.*'` against a `test.txt` file that included a string `v1.0.30841303` and the pipeline fails out with the last step showing the following:

`+ grep -o 'v\w*.*' test.txt`

Is there something I am doing wrong or is there something in Drone that would cause it to incorrectly parse the `\b` in my grep syntax?

Thank you!

---

_[View the full topic](https://drone.discourse.group/t/issues-with-using-grep-in-drone-pipeline/4104)._
