in reply to •Re: Put your inplace-edit backup files into a subdir
in thread Put your inplace-edit backup files into a subdir
Ormkdir bak/ ; perl -pi'bak/*' -e 's/foo/bar/g' file1 file2 file3 ...
Or maybe evenperl -pi'bak/*' -e 'BEGIN { mkdir($^I =~ m!(.*/)!) } s/foo/bar/g' file +1 file2 file3 ...
*grin*perl -MFile::Path -pi'bak/*' -e 'BEGIN { mkpath [ $^I =~ m!(.*/)! ] } +s/foo/bar/g' file1 file2 file3 ...
Makeshifts last the longest.
|
---|