LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] $yesterday

[ILUG] $yesterday

Brian Scanlan bscanlan at irish-times.com
Tue Oct 23 18:04:39 IST 2001


On Tue, Oct 23, 2001 at 12:25:30PM -0400, Baldwin_James at 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




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell