O'Reilly logo

Wicked Cool Shell Scripts, 2nd Edition by Brandon Perry, Dave Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

15DAYS AND DATES

image

It’s tricky to calculate date math, whether you’re trying to figure out if a given year was a leap year, how many days remain until Christmas, or how many days you’ve been alive. This is where there’s a chasm between the Unix-based systems, like OS X, and Linux systems with their GNU foundations. David MacKenzie’s rewrite of the date utility for the GNU version of Linux is dramatically superior in its capabilities.

If you are using OS X or another system where date --version generates an error message, you can download a set of core utilities that will give you GNU date as a new command line option (probably installing it as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required