Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Perl Breakdown

Re: Perl Breakdown

From: <Jared.Still_at_radisys.com>
Date: Fri, 24 Jan 2003 16:48:40 -0800
Message-ID: <F001.0053A45B.20030124164840@fatcity.com>


Nice effort!

You could try:

function f_file_date {

        perl -e 'print scalar(localtime((stat($ARGV[0]))[9])) ' $1 }

Jared

"Post, Ethan" <Ethan.Post_at_ps.net>
Sent by: root_at_fatcity.com
 01/24/2003 03:04 PM
 Please respond to ORACLE-L  

        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
        cc: 
        Subject:        Perl Breakdown


This will make Jared happy, I finally broke down and fumbled my way through
some perl.

function f_file_date {

   {
   print "#!/usr/bin/perl"
   print "print scalar(localtime((stat(\"${1}\"))[9]))"
} > tmp.pl

   perl tmp.pl
   rm tmp.pl
}

This little diddy can be placed right in my .ksh script to get file modification times in a consistent format, I wanted to use "ls -l" but then
it occurred to me that once the year changes the "ls -l" returns a different
formatted date entry for files modified during the last year. Maybe someone
can suggest a prettier method of doing this within a .ksh script without calling another script.

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: Jared.Still_at_radisys.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jan 24 2003 - 18:48:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US