special characters

Hey guys,

I'm trying to replace "]Facebook" from the text

but

sed 's/]Facebook/Johan/g'

is not working

could you please help me with that?

Try this:

sed 's/\]Facebook/Johan/g'  inputfilename > newfilename
1 Like

Not working, how?

$ echo "]Facebook" | sed 's/]Facebook/Johan/g'
Johan

What is the source of "]Facebook" - where does that come from - ] is suspiciously the ending of some control character?

1 Like

Not working :frowning:

sed: -e expression #1, char 40: unknown option to 's'

---------- Post updated at 07:06 AM ---------- Previous update was at 06:59 AM ----------

worked, it was a problem by another line, tnx

Works for me..

inputfilename:

]Facebook
sed 's/\]Facebook/Unix/g' inputfilename > newfilename

newfilename:

Unix

Post the output of

cat -vE input_file

--ahamed

Please post sample bad lines from

sed -l inputfilename | grep "Facebook"

The "sed -l" is designed to make unprintable characters visible.