The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Friendz.. plz help me on this date function. psn123 UNIX for Advanced & Expert Users 14 07-23-2008 01:09 PM
Function to find day of any given date. RRVARMA Shell Programming and Scripting 5 05-12-2008 12:19 AM
Date Function charandevu Shell Programming and Scripting 1 04-02-2008 06:12 AM
Date Function charandevu Shell Programming and Scripting 1 04-02-2008 04:44 AM
date function abey Shell Programming and Scripting 2 02-27-2006 02:28 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 09-25-2001
Registered User
 

Join Date: Sep 2001
Location: CHENNAI, INDIA
Posts: 15
Thumbs up

Hi,

sorry for the delayed response, just figured out.

u can use:

echo `echo '*time-0t86400=Y' | /usr/bin/adb -k | tail -2`

to get yesterdays date.

Thanks,
__________________
K a n d a n
Forum Sponsor
  #9  
Old 09-26-2001
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,613
Whoa! Interesting approach, kandanmv! And I didn't know adb defaults the objectfile and corefile with -k like that. But it does seem to work.
  #10  
Old 09-26-2001
Registered User
 

Join Date: Sep 2001
Location: CHENNAI, INDIA
Posts: 15
gee thanks.
but the easiest way would be to use perl

# perl -e 'printf "%s", scalar localtime(time-86400)'

regds,
__________________
K a n d a n
  #11  
Old 09-27-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Or save yourself a few bytes:

perl -e 'print scalar localtime(time-86400)'
  #12  
Old 07-22-2003
Registered User
 

Join Date: Jan 2002
Posts: 2
Thanks, kandanmv and PxT

Thanks, kandanmv and PxT. The Perl commands are useful.
  #13  
Old 10-13-2003
nitin's Avatar
Registered User
 

Join Date: Aug 2001
Location: Toronto, ON
Posts: 55
Thumbs up Very helpful

Perderabo's code was very helpful. I used it adn worked fine, except that my linux box was giving me errors on set and typset commands, so I just took them out!
Thanks
Nitin
Google The UNIX and Linux Forums
Closed Thread

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0