# Cannot use sed inside it

**URL:** <https://forum.ansible.com/t/cannot-use-sed-inside-it/26888>\
**Category:** Ansible Project\
**Created:** [March 2, 2018, 3:48pm UTC](https://forum.ansible.com/t/cannot-use-sed-inside-it/26888 "2018-03-02T15:48:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_MARRE](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Alexandre\_MARRE](https://forum.ansible.com/u/Alexandre_MARRE)\
**Post date:** [March 2, 2018, 3:48pm UTC](https://forum.ansible.com/t/cannot-use-sed-inside-it/26888/1 "2018-03-02T15:48:35Z")

</div>

Hello, I have a little bug with ansible parser I can’t execute this code in ansible:

This code works on shell

`  
echo “INSERT INTO scripts VALUES (‘1’, ‘install-debian’, ‘$(cat startupscripts/install-debian.sh | sed "s#’#‘’#g”)', 0);" | docker exec -i --user postgres $(docker-compose ps -q postgres) psql baremetal

`

So I escaped it like this

`

“echo "INSERT INTO scripts VALUES (‘1’, ‘install-debian’, ‘$(cat startupscripts/install-debian.sh | sed "s#’#‘’#g")', 0);" | docker exec -i --user postgres $(docker-compose ps -q postgres) psql baremetal”

`

But this doesn’t work can you tell me why ?
