I'm having some trouble doing something that should be fairly simple. Here is how I imagine it would work:
find . -name *.txt -exec sed 's/oldtext/newtext/g' {} > tmp \\; mv tmp {} \;
Unfortunately I can't sed a file and dump to itself. But I can't figure out how to dump to a temp file and then immediately mv that file. I know \\; is wrong but I can't figure out how to run one command followed by the other.
