Skip to content

Instantly share code, notes, and snippets.

@kirichkov
Created September 2, 2012 15:58
Show Gist options
  • Save kirichkov/3600870 to your computer and use it in GitHub Desktop.
Save kirichkov/3600870 to your computer and use it in GitHub Desktop.
Generate html for all files in a directory
ls -1 | while read filename; do echo "<li><a href=\"/uploads/$filename\" target=\"_blank\">"; echo `basename $filename .pdf` | sed 's/_/ /g'; echo "</a></li>"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment