SUMMARY: returning ~specific~ text pattern from files

From: Markham, Richard <RMarkham_at_hafeleamericas.com>
Date: Tue Nov 19 2002 - 11:47:15 EST
Thanks "SteinAxt" for your helpful suggestions.

My solution involved what I was supposed to remember from school =)
I used sed pattern saving \(...)\ and search,replace to cut off
text before and after specific patterns.

My final base script:
# /bin/ksh
  for FILEN in *.fmx
   do
    printf "[${FILEN}] "
    strings ${FILEN} | grep \$Header.*${FILEN%".fmx"}.fmb | \
     sed 's/.*\($Header\)/\1/' | \
     sed 's/\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\).*/\1/' | \
     uniq
   done

Pattern of interest in files were:
(output from script)
[IEXACCNT.fmx] $Header: IEXACCNT.fmb 115.147 2001/06/05 13:50:46
[IEXADMAB.fmx] $Header: IEXADMAB.fmb 115.53 2001/06/05 13:50:58
[IEXADMGN.fmx] $Header: IEXADMGN.fmb 115.28 2000/03/01 08:39:10
[IEXADMLB.fmx] $Header: IEXADMLB.fmb 115.14 2001/06/05 13:51:10
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Nov 19 11:57:10 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:58 EST