I'm injecting a proxy variable into a shell script. I have to escape the string as there is a space in between.
sed -i -e 's#UseConcMarkSweepGC#UseConcMarkSweepGC $PROXY_ARGS#g' ${TEST_HOME}/bin/test.sh
Now this is always generating another file ith -e
at the end, so I end up with test.sh
and test.sh-e
. Both are the same. Currently I'm doing
rm test.sh-e
right after sed
which is working fine. I'm wondering if there is a way to not generate a temporary file at all? I can't remove the -e
as I'm getting the error sed: -i may not be used with stdin
.