Skip to content

Instantly share code, notes, and snippets.

@lionelyoung
Created May 22, 2010 04:08
Show Gist options
  • Save lionelyoung/409759 to your computer and use it in GitHub Desktop.
Save lionelyoung/409759 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Print out the html locations of all the files in public_html
# Quick and dirty script just to get some HTML links to the mp3s in the public_html folder
MYDIR=/home/lionel/public_html
DYNDNS=mydyndnsusername
cd $MYDIR || exit 1
ls -t *.mp3 | sed -r 's|(.*)|<a href="\1">\1<\/a><br>|g' > music.html
echo "http://$DYNDNS.ath.cx/~lionel/music.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment