Using sed to get rid of characters < > ,

sed

I have a file with lines as follows:

...
... <230948203[234]>, ...
... <234[24]>, ...
..

I would like to use sed to remove the characters < , and > from every line

I tried using sed 's/<>,//g' but it didn't work (it didn't change anything). Do I need to escape these special characters. Is it possible to delete multiple characters using a single sed command?

Best Answer

With sed:

sed 's|[<>,]||g'

With tr:

tr -d '<>,'
Related Question