Friday 3 May 2013

Unix: replacing a block of text in multiple files

I was trying to do this in IntelliJ using Structural Search but this
function doesn't seem to work on non-recogised files (ie, java/ xml/
etc).. I just wanted to replace the contents of a plain text file with
a larger block of text.

Ended up doing this manually but if I wanted to fiddle, perhaps this
approach using sed would have been the right way to go:

http://stackoverflow.com/questions/6524896/unix-easiest-way-of-recursively-replacing-a-block-of-multi-line-text

No comments: