I am using a Linux container on CircleCI with an image of circleci/node:11.14.0
and coming across an error when trying to run a sed command.
Code:
sed -i 's/<script>!f.*"dataLayer")<\/script>/<meta name="robots" content="noindex,nofollow,noimageindex,noarchive" \/>/' build/index.html
sed -i 's/<noscript><iframe.*iframe><\/noscript>//' build/index.html
Error:
sed: -e expression #1, char 1: unknown command: `.'
sed: -e expression #1, char 1: unknown command: `.'
I can run this without errors on my Mac (need to add '.bak' after -i), so I am not understanding why it doesn't work on CircleCI? I have tried to escape the special characters without any luck.