Mass Delete Code

Is it possible to delete a certain few lines of code from every page on my website?

Yes.

There are a lot of different ways to do it. One is to use the command line. For example, if you remix ~hello-express. and then open up the command line and run:

sed '/Glitch/d' <README.txt

and it would print out README.txt with all the lines that contain Glitch deleted. If after you review that, you like the way that looks then you could do:

sed '/Glitch/d' <README.txt >README2.txt

and that would create an edited version of README called README2.txt (since you created it on the command line you need to run refresh if you want to. see it in the. filetree)

Then mv README2.txt README.txt will copy README2.txt onto and replacing README.txt.

Hope this helps,

Johnicholas

1 Like