If you want to quickly replace a string with another string in a text file, try sed. Above is an example.
By using sed, I can change the string ‘sunny’ with ‘rainy’, ‘outside’ with ‘inside’. Pretty convenient isn’t it?
Use ‘s/sunny/rainy/g’ if you want to replace all occurrences of a string.