Declaring bankruptcy after an hour trying to solve this. Here's the question:
I have a folder with 15,000 files (Magento). I want to change all copyright dates from 2013 to 2012 so I can get a legitimate diff between releases. I'm trying to use sed, based on this example: https://stackoverflow.com/a/1583282
This command is working:
cd path/to/project
find . -type f -print0 | xargs -0 sed -i '' 's/2013/2012/g'
Except, I obviously can't trust that 2013 only applies to dates. The full string in Magento's DocBlocks is:
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
I'm trying to rewrite the sed expression to use "(c) 2013 Magento" as the string, but I'm getting the error:
sed: RE error: illegal byte sequence
Obviously, something needs to be escaped but I can't find any applicable examples. I am not a bash-wizard by any means.
What's the correct format for this segment of the expression?
's/(c) 2013 Magento/(c) 2012 Magento/g'