Skip to content

Instantly share code, notes, and snippets.

@lionelyoung
Created May 22, 2010 04:08

Revisions

  1. lionelyoung created this gist May 22, 2010.
    10 changes: 10 additions & 0 deletions sharemp3.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/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"