Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Export Wordpress to Hugo

Export From Wordpress

I used plugins, then custom wrote some scripts to polish the output

Fixup any issues such as cannonical names

sed -i 's/www\.SOMEDOMAINHERE\.com/SOMEDOMAINHERE\.com/g' *.md

Fixup http/https issues

sed -i 's/http:\/\/SOMEDOMAINHERE\.com/https:\/\/SOMEDOMAINHERE\.com/g' *.md

Replace Text in all Sub Directories

find . -type f -name '*.markdown' -exec sed -i 's/oldtext/newtext/g' {} +

Case insensitive, add the I

find . -type f -name '*.markdown' -exec sed -i 's/oldtext/newtext/gI' {} +