Following sed command works on Linux and Windows but fails on MacOS/BSD:
sed -i '/"appId"/c\ \"appId":\ \"'${applicationId}'\",' $capacitorConfigJson
I tried to add ' ' -e
sed -i ' ' -e '/"appId"/c\ \"appId":\ \"'${applicationId}'\",' $capacitorConfigJson
and then script fail with error:
sed: 1: "/"appId"/c\ \"appId":\ ...": extra characters after \ at the end of c command
I found similar solutions to add newline after c\ but it doesn't seems to work.