removing '[20]' from a file

Hey guys,

I'm using sed to remove

[20]

from a file and using either of this:

sed 's/[21]//g'|
sed 's/'[21]'//g'|
sed 's/'$(echo "[21]")'//g'|

but those are just deleting '1' from the file, could you please help me with that?

expecting this ..

$ echo "test[20]" | sed 's,\[20\],,g'
test
1 Like

worked perfect, tnx :slight_smile: