script: processing files

Hi All,

I have a log file which is attached here:

ACCTXN.ALLOC, ACCTXN.IDX, ACCTXN.UDX, AE_COMS, AGENCY are different file names present in my input file (it could be 000s files and all names are starting with [A-Z]).

Now, I am interested in getting the files which are having " Predicted optimal size:" section and I want to execute a command like this:

(Block size and Modulo are from "Predicted optimal size:" section)
eg:

Please help me with this...
I tried writing an awk script by myself (nawk '/[1]+/' GUIDE_LOG.txt) but i am confused how to grep for the occurrence of "Predicted optimal size:" before next "[2]+" :frowning:

Note: i am on Solaris.


  1. A-Z ↩︎

  2. A-Z ↩︎

Are you looking for...?

nawk '{print "memresize",$1,$10/1024,$13}' RS= inputfile