I'm running this command in a bash shell on Ubuntu 12.04.1 LTS. I'm attempting to remove both the
] characters in one fell swoop, i.e. without having to pipe to sed a second time.
I know square brackets have special meaning in a regex so I'm escaping them by prepending with a backslash. The result I was expecting is just the string
123 but the square brackets remain and I'd love to know why!
~$ echo '' | sed 's/[\[\]]//'