I'm trying to remove the
] characters using one sed command:
# echo "A=[A]" | sed s'/[=\]]/ /g' A=[A]
Something is wrong with this syntax?
I Expect the following results from sed
# echo "A=[A]" | ....sed A [A
You can use the '-e' flag to execute multiple substitutes, for example:
It might be possible to match both '=' and ']' in a single substitute but even if it is, I don't think it'll provide much benefit over using '-e'.
It's probably easier to use tr to do something like this as it doesn't involve messing with REs