Posts
read more
Regular expression, find and replace using Unix tools
I need to add some text to a lot of text files. Previously, I used jEdit to perform regular expression for several files. But currently, I need to add the text for about 120 files. In order to do this, I tried using Unix tools, “sed”, “grep”, and “xargs”.
Firstly, I tried MSYS, yet it fails. Because the “sed” version was too old. Then, I used Cygwin.
My problem was to add the following text to the text files: