title: How to convert DATE to UNIX TIMESTAMP in shell script on MacOS
body: <p>On Linux you can convert a date like "2010-10-02" to a unix timestamp in shell script by</p>
  
  <pre><code>date -d "2010-10-02" "+%s"
  </code></pre>
  
  <p>Since Mac OS does not have the equivalent <strong>-d</strong> for <strong>date</strong>. How do you go about converting a date to a unix timestamp in a shell script.</p>