Skip to content

Instantly share code, notes, and snippets.

@dickfeynman
Created October 19, 2013 23:51
Show Gist options
  • Save dickfeynman/7063013 to your computer and use it in GitHub Desktop.
Save dickfeynman/7063013 to your computer and use it in GitHub Desktop.
#!/bin/sh
#if grep 'tags'
#sed '{[/]<n>|<string>|<regex>[/]}d' <fileName>
for f in *.md
do
sed -i '2i\layout:\ post' $f
sed -i '/tags/d' $f
sed -i '/descripti*/c\comments:\ true' $f
sed -i '/type*/c\published:\ true' $f
done
@dickfeynman
Copy link
Author

A simple bash script to convert the markdown files for my Ruhoh blog posts to the format required by Octopress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment