If I have the following $STRING
aaa.bbb.ccc.[ddd].eee.fff.[ggg].hhh
is there any way, using bash parameter expansion, to echo the following
aaa.bbb..ccc.eee.fff..hhh
That is, remove all occurrences of square brackets and everything inside those brackets? Everything I've tried ends up either removing everything in the string after the first left bracket or removing the brackets but leaving behind everything inside the brackets.