Last active
December 22, 2015 22:59
-
-
Save nlindley/6544291 to your computer and use it in GitHub Desktop.
Silly one-liner that lists directory contents (for my use-case, they were only regular files), strips the extension, titleizes the filename, and prepends that as a Markdown heading.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for FILENAME in `ls`; do perl -pi -e "print \"# `ruby -e \"require 'active_support/inflector'; puts '${FILENAME%.md}'.titleize\"`\n\n\" if $. == 1" $FILENAME; done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment