I am trying to use this command to remove all <
and >
and +
characters from a string. But the command tr
is inserting a space character in its place. I want to also remove all spaces.
In
<ModelName>.<123456798123465>.
Out
ModelName . 123456798123465 .
Expected Output
ModelName.123456798123465.
Command used
String | tr '<>+,' ' '
What am I missing here ?
You could use sed instead of
tr
like below.Character class
[+<>]
matches all the+
or<
or>
symbols. By replacing the matched characters with an empty string will give the desired output.