This command works as expected:
$ echo "foo}bar]baz" | sed 's/}/@/g; s/]/@/g'
foo@bar@baz
Now I am trying to do the same thing using character class like this:
$ echo "foo}bar]baz" | sed 's/[}\]]/@/g'
foo}bar]baz
This did not work. I want to have a character class with two characters } and ] so I thought escaping the square bracket like }\] would work but it did not.
What am I missing?