Replace text from terminal - DataDog/dd-sdk-ios GitHub Wiki
sed
is probably the go-to tool for replacing text in files from terminal.
I know the syntax, that's easy...
sed "s/old_text/new_text/g" old_file.txt > new_file.txt
and to change it in-place...
sed -i "s/old_text/new_text/g" file.txt
...why doesn't that work? 🤔
Oh I should've added an empty string ""
after -i
!
sed -i "" "s/old_text/new_text/g" file.txt