I am trying to make the following changes to my files:
grep -rl 'arg_1 :' . | xargs sed -i 's/arg_1 :/arg_1:/g'
That is, I am looking to replace arg_1 :
with arg_1:
However when I run this same argument, I get the following error:
sed: 1: "./ua/uaosfamily.md": invalid command code .
If I replace. by the absolute path, I get the following error:
sed: 1: "/Users/josemanueldefrut ...": invalid command code j
I understand that in passing. as an argument it is not evaluated as the absolute path and therefore the fault arises. Could someone explain to me why this happens and how can it be solved?