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