Replacing Square Brackets With Sed
Posted by BadReligion
For me the following do not work:
sed 's/(\[|\])//g' sed 's/[[]]//g'The following do work:
sed 's/[][]//g' sed -e 's/\[//g' -e 's/\]//g'
Example:
echo '[foobar]' | sed 's/[][]//g' >foobar echo '[foo]bar' | sed 's/[][]//g' >foobar
The environment is Debian 4.0, GNU sed version 4.1.5.



