I need to be able to pass the file download URL as well as the path to save the file.
I think this has something to do with -O and -o in CURL, but I can't figure it out.
For example, this is what I use now in a bash script:
#!/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 that I can do
getsrc http://www.apache.org/dist/ant/binaries/apache-ant-1.7.1-bin.tar.gz /usr/local
and save the file to / usr / local?
source
share