I do not want to replace just any letters with words. I only want to replace letters that are stand alone with exact case sensitive matches.
I have a file that looks like this:
file>-string pile stage one on one/a>b
system > use while one is one stage/sump/f
get sole--> one by one dir/sub/main/c >b
multi string return one by one sub//c static a
ect...
ect...
I want to replace the letter that are not part of word.
a=ASTRING
b=BSTRING
c=CSTRING
f=FSTRING
The desired output would look like:
file>-string pile stage one on one/ASTRING>BSTRING
system > use while one is one stage/sump/FSTRING
get sole--> one by one dir/sub/main/CSTRING >BSTRING
multi string return one by one sub//CSTRING static ASTRING
ect...
ect...
Here is what I have been trying:
sed -i "s|a|ASTRING|g" file.txt
grep [a] file.txt | sed -i "s|a|ASTRING|g"
Repeated for b c f