Skip to content

Instantly share code, notes, and snippets.

@stepankuzmin
Last active August 29, 2015 14:20
Show Gist options
  • Save stepankuzmin/39d188e5cf5e0cd084ca to your computer and use it in GitHub Desktop.
Save stepankuzmin/39d188e5cf5e0cd084ca to your computer and use it in GitHub Desktop.
*.rb and *.coffee sources as markdown
#!/bin/bash
find app \( -iname "*.rb" -o -iname "*.coffee" \) -exec awk 'BEGIN {printf("\n*%s*\n", ARGV[1]); printf("\n```\n")} {printf("\t%s\n", $0)} END{printf("```\n")}' "{}" \; > source.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment