Eliminate a special character
I tried to eliminate the double character == with sed:
Code:
sed -e 's/[=\]//g;s/ / /g' I want to know how I can change it to remove only == |
what about:
s/==//g; |
i try this but it dosen't work
|
?
would be nice to see an example or detailed description. a simple "does not work" does not work. |
this is an example:
Quote:
|
Then please try what was suggested
Code:
$ sed ' s/==//g;' |
and what is the problem with s/==//g ?
|
Quote:
@OP you need to be more descriptive, we're not mind readers and we can offer a solution. Odds are this solution is not always a "one of" and as a result there are a variety of possible test cases where you'd need to alter different patterns. The issue there are that you need to describe the total conditions of your problem. Otherwise just saying "it didn't work" is a waste of time, because pan64's recommendation does work for your test string. |
Quote:
Perhaps there is an ambiguity in the problem statement. One person might think you want to change abc==def to abcdef and another person might think you want to change abc==def to abc=def. Did you consider using tr -s "=" ? Daniel B. Martin |
All times are GMT -5. The time now is 05:29 AM. |