Search and replace multi-line expressions with SED

Date Tags sed / unix

Now here's an interesting problem:

I wanted to do a recursive search and replace in unix, AND I wanted to do an expression that spans multiple lines. Here's what I came up with:

find ./ -type f | xargs sed -E -i -n'1h;1!H;${;g;s/<\/fileSet>.*<fileSet ...

more ...

About Yusuke Tsutsumi
I work at Zillow. I focus on tools and services for developer productivity, including build and testing.

My other interests include programming language design, game development, and learning languages (the non-programming ones).