Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 22 lines (17 sloc) 0.408 kb
12b060e @JosephPecoraro Adding mp3dl
authored
1 #!/bin/bash
2 # Bash Script to download a given mp3
3
4 # First argument is required
5 if [ ! -n "$1" ]; then
6 echo "usage: `basename $0` url [name]"
7 exit $E_BADARGS
8 fi
9
10 # URL for the mp3
11 url="$1"
12
13 # Name of the file is provided or epoch of now.
14 name=$2
15 if [ ! -n "$2" ]; then
16 name=`ruby -e 'puts Time.now.to_i'`
17 # name=`perl -e 'printf"%d\n", time();'`
18 fi
19
20 # Download
21 curl "$url" -o "$HOME/Desktop/$name.mp3"
Something went wrong with that request. Please try again.