Skip to content
wphooper edited this page Dec 22, 2023 · 4 revisions

Welcome to the renotrails wiki!

Notes on batch editing the files.

I used the following to update the HTML tag and add a doctype.

grep -rli '<HTML' * | xargs -i@ sed -i 's/<HTML>/<!DOCTYPE html>\n<HTML LANG="en">/g' @

Note that / needs to be escaped as \/. (Less relevant characters that need to be escaped are $.*[\^. See this stack exchange)

I used the following to run the files through tidy.

grep -rli '<HTML' * | xargs -i@ tidy -m @

To check a file and only print the error messages and warnings:

tidy -q links.htm > /dev/null
Clone this wiki locally