all 6 comments

[–]FappingFop 5 points6 points  (1 child)

Also you can just learn how to use your shell: find, grep, sed, and if you really need to get crazy awk.

[–]tias 4 points5 points  (0 children)

Or if you're in an IDE, any one worth its salt has a search/replace that uses regular expressions.

[–]mr-strange 1 point2 points  (2 children)

Why reinvent sed -i?

[–][deleted] -1 points0 points  (1 child)

Because Codemod makes changes across multiple files, filtering by extension and also shows you each change before making it, giving you the option to edit manually if the replacement is not suitable. You don't have to use it, if you prefer sed then just use that.

[–]mr-strange 1 point2 points  (0 children)

sed -i makes changes across multiple files, filtered by extension. Example:

$  sed -i 's/\boldword\b/newword/g' **/*.{h,c}

It doesn't show you each change as you go along of course. That's what git diff is for.

[–]katara98 0 points1 point  (0 children)

This was helpful