Home
NOTE: I'm in the middle of upgrading the site. Most things are in place, but some things are missing and/or broken. This includes alt text for images. Please bear with me while I get things fixed.

sed Examples

These examples got mangled in a site transition. TODO : is to get them fixed.

Starting to collect some of the sed command I run. Not sure if they'll be interesting or not.

Note

A good enhancement would be to make little snippts instead of full thing. Like how do I capture a parenthesis

Convert markdown images to neopolitan

<>
sed -E -i "" 's/\!\[Image: [^]]+\]\(([^\)]+)\)/<<\1|img>>/g' a.txt
results start
<>
sed -E -i "" 's/\[\!\[image\]\(([^\)]+)\)([^\)]+)\)/<<\1|img>>/g' a.txt
results start
TODO: Rerun this to show the results
sed -E -i "" 's/\!\[([^\]+)]\(([^\)]+)\)/<<\2|img|caption: \1>>/g'
results start
~ fin ~