On Linux you can convert a date like “2010-10-02” to a unix timestamp in shell script by
date -d "2010-10-02" "+%s"
Since Mac OS does not have the equivalent -d for date. How do you go about converting a date to a unix timestamp in a shell script.
man dateon OSX has this exampleWhich I think does what you want.
You can use this for a specific date
Or use whatever format you want.