EDIT: After using
cat -A myfile it seems problem that those spaces are not spaces, but
M-BM- special character. Using any symbol
. as Oli suggested for search is not good idea as there is risk some other characters will be removed.
So actual question is - does anyone have an idea how to remove
M-BM- special character without risking losing other characters?
I found an answer: How to remove special 'M-BM-' character with sed
I have a string of text:
" . . ."
space dot space dot space dot
I am trying to replace all occurence of this string in text file to
dot dot dot
I was trying to do with sed:
sed -r 's:\s\.\s\.\s\.:...:g' -i sed-dots
Unfortunately, it does not change input file even a bit. File: https://www.dropbox.com/s/46zmiruy3ln85a1/sed-dots
When I try to do replace same string in text editor (I use geany) it is found and replaced properly.
Only reason I can think of is that some (or all) of those spaces are not really spaces, but some special character.
Does anyone have idea how to find and replace that string with sed (or any other command line tool)? Please test your idea on my file, as problem is not as obvious as it might seem to be - this is why I asked about it.