I have a bunch of documents where I need to change the word pi
to pisignage
.
No big deal there:
sed -i -e 's/pi/spisignage/g' /path/to/file
However it is finding things like the word stopping and making the word stoppisignageng.
Any suggestions to just find the word pi
and change it?
RudiC
2
Welcome to the forum.
Please don't post duplicates, and use code tags.
figured it out. Mind fart on my side.
sed -i -e 's/\bpi\b/pisignage/g'
1 Like
RudiC
4
Some sed
provide "word boundary" designators, like \b
or \>
and \<
in GNU sed
.
Depending on your OS (which you fail to mention, btw), your sed
version may or may not offer equivalent syntax.