Files xxxxxxx.txt
------------------------------------------------------------------------------------------------------------------------------------
Req.By: xxxxxxx WABUSH MINES -
xxxxxx MINE (1001) Page: 1
Run on: 12/14/09 at: 16:30:03 * Report: MSB222A
PURCHASE ORDER PRINTING SUMMARY Version: 5.2.36.AA9
------------------------------------------------------------------------------------------------------------------------------------
Report Parameters: Request Userid: xxxxx
Requested on: 12/14/09 at: 01:30:59
Selection Criteria:
Default Medium: P Printer
Indicator: Live Y Confirmation Y
Medium: Printed Y Telex Y Fax Y EDI Y
Order Type: Normal Y Consignment Stock Y Transfer Stock Y Workshop Y Field Releas N
PRINT RUN NUMBER: 1376
CONTROL TOTALS
No. Orders Printed for the first time 25
No. Modified Orders Printed (all items) 0
No. Modified Items Printed (incl. Header) 4
Print Global Orders Indicator
No. Orders not Printed (min order value) 0
Files xxxxxxx.txt
------------------------------------------------------------------------------------------------------------------------------------
Req.By: xxxxxxx Michigan MINES -
xxxxxx MINE (1412) Page: 1
Run on: 12/14/09 at: 16:30:03 * Report: MSB222A
PURCHASE ORDER PRINTING SUMMARY Version: 5.2.36.AA9
------------------------------------------------------------------------------------------------------------------------------------
Report Parameters: Request Userid: xxxxx
Requested on: 12/15/09 at: 01:30:59
Selection Criteria:
Default Medium: P Printer
Indicator: Live Y Confirmation Y
Medium: Printed Y Telex Y Fax Y EDI Y
Order Type: Normal Y Consignment Stock Y Transfer Stock Y Workshop Y Field Releas N
PRINT RUN NUMBER: 1785
CONTROL TOTALS
No. Orders Printed for the first time 15
No. Modified Orders Printed (all items) 10
No. Modified Items Printed (incl. Header) 4
Print Global Orders Indicator
No. Orders not Printed (min order value) 1
There are 114 files that I have moved into thier own dir. I know how to grep and cat for a single value but what I realy need to do is pull back the following information on one or more lines from each file into one single file. The actual values will differ from file to file.
I need the following from each
xxxxxx MINE (1412) where xxxxx and 1412 will differ from file to file
PRINT RUN NUMBER: 1785 where 1785 will differ from file to file
No. Orders Printed for the first time 15
No. Modified Orders Printed (all items) 10
No. Modified Items Printed (incl. Header) 4
Print Global Orders Indicator 0
No. Orders not Printed (min order value) 1
Where the above numbers will differ from file to file.
I know how to grep or find for single items
find . -exec grep -l WorkOrderExtract '{}' \; >> Work.txt or
grep -il TOTAL-PICKED * > /home/mspencer/TOTAL-PICKE.txt
I just figure there has to be a way to do this better
Sorry I forgot to post the outfile.
Outfile ( all on one line)
xxxxxx MINE (1412) RUN NUMBER: 1785 Orders Printed for the first time 15 Modified Orders Printed (all items) 10 Modified Items Printed (incl. Header) 4 Global Orders Indicator 0 Orders not Printed (min order value) 1
or muliple lines using xxxxxx MINE (1412) as the break
xxxxxx MINE (1412)
RUN NUMBER: 1785
Orders Printed for the first time 15 Modified Orders Printed (all items) 10 Modified Items Printed (incl. Header) 4 Global Orders Indicator 0 Orders not Printed (min order value) 1