How to replace special characters?

UNIX for Advanced & Expert Users

Kindly Note - This is a Single User Post by Forum Member Ravi.K Regarding:
How to replace special characters?.
Please Follow The Primary Link Above to View the Full Discussion.

Old 04-21-2017
Ravi.K Ravi.K is offline
Registered User
How to replace special characters?

Hi Team,

I have data like this.


Would like to add zero (0) before the decimal point where there is no zero as


How to replace |*|. with |*|0.

I tried below command which didn't work

echo '|*|.5|*|0.2|*|A.B|*' | sed 's/\|\*\|\./\|\*\|0\./g'


Last edited by Corona688; 04-21-2017 at 02:47 PM..