From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653669622104.tru64-unix-managers.marc@archive.invalid> From: Jonathan Williams Date: Fri, 24 Aug 2001 15:21:31 +0000 To: tru64-unix-managers Subject: Korn Shell Script question X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653669622104 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------=_NextPart_000_02F5_01C12C8E.ECB297F0" This is a multi-part message in MIME format. ------=_NextPart_000_02F5_01C12C8E.ECB297F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi...I'm not sure if this is the right place to be asking--but I'm using = a Tru64 5.1 box, so I'll just go for it. I'm writing a Korn shell script, and one part I just can't figure out. = In a given directory we have a bunch of log files. These files are = constantly being updated with more data. How would I go about geting a = list of all the files in this directory that were CREATED on a = particular day. Basically I'm not sure how to get a listing by creation = date...not modification date. If this is not the right place to = ask...could someone point me to a Korn Shell board? TIA Jonathan Williams UNIX Systems Administrator The Shubert Organization, Inc. ------=_NextPart_000_02F5_01C12C8E.ECB297F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi...I'm not sure if this is the right = place to be=20 asking--but I'm using a Tru64 5.1 box, so I'll just go for = it.
 
I'm writing a Korn shell script, and = one part I=20 just can't figure out.  In a given directory we have a bunch of log = files.  These files are constantly being updated with more = data.  How=20 would I go about geting a list of all the files in this directory that = were=20 CREATED on a particular day.  Basically I'm not sure how to get a = listing=20 by creation date...not modification date.  If this is not the right = place=20 to ask...could someone point me to a Korn Shell board?  = TIA

Jonathan Williams
UNIX Systems=20 Administrator
The Shubert Organization, = Inc.
------=_NextPart_000_02F5_01C12C8E.ECB297F0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Brehl, Blake" Newsgroups: gmane.os.tru64.managers Subject: korn shell script question Date: Thu, 23 Oct 2003 16:00:21 -0700 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1066950053 31406 80.91.224.253 (23 Oct 2003 23:00:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 23:00:53 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Fri Oct 24 01:00:51 2003 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1ACoRm-0000s5-00 for ; Fri, 24 Oct 2003 01:00:51 +0200 Original-Received: (qmail 7732 invoked by uid 5); 23 Oct 2003 23:00:39 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 7717 invoked by uid 49493); 23 Oct 2003 23:00:38 -0000 Original-Received: from Blake.Brehl@anritsu.com by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-0.9/5.0):. Processed in 0.576769 secs); 23 Oct 2003 23:00:38 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 23 Oct 2003 23:00:37 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HN800KIHFWZTL@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 23 Oct 2003 19:00:37 -0400 (EDT) Original-Received: from mailhost2.us.anritsu.com (mailhost2.us.anritsu.com [12.151.36.154]) by emroute3.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HN800MG1FWW19@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 23 Oct 2003 19:00:33 -0400 (EDT) Original-Received: from moh-exc-001.main.intgin.net ([172.26.1.92]) by mailhost2.us.anritsu.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 23 Oct 2003 16:00:21 -0700 Original-Received: by moh-exc-001.main.intgin.net with Internet Mail Service (5.5.2653.19) id ; Thu, 23 Oct 2003 16:00:21 -0700 Content-return: allowed Original-To: "Tru64 Mailing List \(tru64-unix-managers@ornl.gov\)" X-Mailer: Internet Mail Service (5.5.2653.19) X-OriginalArrivalTime: 23 Oct 2003 23:00:21.0835 (UTC) FILETIME=[6FB099B0:01C399B9] Xref: main.gmane.org gmane.os.tru64.managers:5641 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:5641 Hi, I want to identify the number of the line of the last occurance of the string "End of Report" within a file. #> more somefile line1 line2 End of Report line4 End of Report line6 End of Report #> #> #!/bin/ksh #> grep -in "End of Report" somefile | awk -F: '{print $1}' results in 3 5 7 Is there a way to capture the last value (7), when you don't know how many occurance? I have gnugrep loaded if that is a better command. TRU64UNIX V5.1A sp4 Best Regards, Blake Brehl Sys Admin/DBA Anritsu Company United States Morgan Hill, CA