I have a text file where I'd like to add a string in the beginning of the line, however, it has special characters and sed complains about that.
The warning I get is:
sed: 1: "s/^/curl curliian.bxss ...": bad flag in substitute command: 'b'
So I tried to escape the dot:
dirnamer="$(dirname $1 | sed 's/\./\\./g')"
Which didn't work, so I tried to escape the
b, which didn't work either. So yeah, this is what I do right now:
sed -i '' "s/^/curl $dirnamer/g" ~/desktop/download
But it seems there's alot of problems to do with with sed, because of special characters. What's a better method?