[rescue] Help w/ computer time??

Jonathan C. Patschke jp at celestrion.net
Wed Apr 24 13:47:15 CDT 2002


On Wed, 24 Apr 2002, Linc Fessenden wrote:

> Since I really suck w/ perl I was wondering if one of you might be able to
> help me quickly...
> I have a file full of unix dates (epoch) listed one on a line.  I need to
> get these converted to localtime.  Is there a quick and dirty for this
> somewhere that I just can't find?

for i in `cat filename` ; do
  echo -n $i ' '
  echo $i | gawk '{print strftime("%a %b %d %H:%M:%S %Z %Y", $1)}'
done

--Jonathan



More information about the rescue mailing list