Re:Useful Perl one-liners (2013)
by scrame on Tuesday November 29, 2016 @03:49PM
(#13066145)
The -i switch takes an optional string that creates a backup of the file with that extension. To use your example (with zsh blobbing):
Recursively replaces foo with bar on every .txt file in a hierarchy and saves the original file with a .bak extension, along with the in-place edit in the original.
[ Parent
| on HN ]
There are no comments on this comment yet.