Last active
August 29, 2015 14:01
-
-
Save qaisjp/8871c717ec300d704ae3 to your computer and use it in GitHub Desktop.
A little script that enumerates all files in the current folder recursively and does something to each file
This file contains 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
# replaces the contents with "$FILENAME\n======" (representing a markdown header with the filename). | |
find . -type f -exec sh -c 'printf "$1 \n======" > "$1"' sh {} \; | |
# append extension ".md" | |
find . -type f -exec sh -c 'mv "$1" "$1.md"' sh {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment