Multi-file Search and Replace

We wanted to do a renaming today. Part of the refactoring meant updating some strings in Adobe XDP files. Cracking open XDPs feels a little like tearing the tags off a mattress.

Eclipse helped us find which XDPs we wanted to update using CTRL+H. We were pleased to see that right-clicking in the Search results gave us an option to follow up with a Replace. We were not so pleased that Eclipse resaved the XDPs in a way that broke the multi-byte characters in the XDPs.

Diana whipped up a little python script to do the search and replace. Our side-trip to the command line got me thinking about a little one-liner to do the same thing with a little bit of find and a dash of sed.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply