Find and replace in file and overwrite file doesn’t work, it empties the file
When the shell sees > index.html in the command line it opens the file index.html for writing, wiping off all its previous contents. To fix this you need to pass the -i option to sed to make the changes inline and create a backup of the original file before it does the changes in-place: sed … Read more