Re: [ILUG] $yesterday

From: Brian Scanlan (bscanlan at domain irish-times.com)
Date: Tue 23 Oct 2001 - 18:04:39 IST


On Tue, Oct 23, 2001 at 12:25:30PM -0400, Baldwin_James at domain emc.com wrote:
> Without going OTT, can anyone think of a way of echoing out a $yesterday
> variable (i.e. yesterdays date! :P )?
> Has the date binary got some fancy footwork to do this already ? Running
> *cough* Solaris 2.6 :(

These are your choices:

* GNU date! Haha, bet you wish you were on Linux, Solaris luser! :)
* Perl! Write some Perl to do it. Perl ships with Solaris 8 these
  days...
* Some C! Yep, some C can do it too. So can loads of languages that are
  compilable or interpretable. You get the idea. You probably want to
  avoid these routes. :)
* Some shell scripting involving cal! You've already done this.

You might come across some suggestions to do some messing with LOCALE
settings to get yesterdays date - avoid this as it can lead to confusing
problems.

Brian.

-- 
Brian Scanlan, Systems Administrator.
Irish Times New Media - http://www.ireland.com


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:52 GMT