I need to be able to pass in the URL of the file download, plus a path for the file to be saved to.
I think it has something to do with -O and -o on CURL, but I can't seem to figure it out.
For example, this is what I'm using in my bash script now:
#!/bin/sh
getsrc(){
curl -O $1
}
getsrc http://www.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gz
How can I change the curl statement so I can do
getsrc http://www.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gz /usr/local
and have it save the file to /usr/local?