Often times I want to edit a whole slew of files at once, changing only a simple string. But it's the same change in all the files.
The solution for this has eluded me till now (worst yet.. it's a simple solution. A classic one liner.)
Simply put this changes every ocurence of "oldstring" to "newstring" in *.py saving the original files as *.py.bak
then verify it did what you wanted and delete the .bak files
4 years, 11 months ago
learn sed, learn awk, then learn to make them make coffee :)
eokyere
4 years, 11 months ago
awk I know (and love). Great for digging through log files. sed I still need to work on.