Dear all, I need your help in the following problem:
When SQL script is executed, so I get the following data as an email message. I saved this message as a text and renamed it.
SQL*Plus: Release xx.x.x.x.x Production on Mon Jun 16 10:30:00 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> Connected.
SQL> SQL> SQL> SQL> FILE_ONE_007
SQL> 2 9876
SQL> FILE_TWO_007
SQL> 2 12345.5
SQL> FILE_THREE_007
SQL> 2 10.5
SQL> SQL> FILE_4
SQL> 2 -999998
I need a script to get the following data with the format:
Mon Jun 16 10:30:00 2011, 007,98767, 12345.5, 109.5
I have tried the following:
gawk " / Production on / {print $6, $7, $8, $9, $10 }" test.txt, and got the first part:
Mon Jun 16 10:30:00 2011
but I think that there is other way to get it also instead of that i used, also I have no idea how to get the rest.
Any idea ? thanks a lot.
with regards
When SQL script is executed, so I get the following data as an email message. I saved this message as a text and renamed it.
SQL*Plus: Release xx.x.x.x.x Production on Mon Jun 16 10:30:00 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> Connected.
SQL> SQL> SQL> SQL> FILE_ONE_007
SQL> 2 9876
SQL> FILE_TWO_007
SQL> 2 12345.5
SQL> FILE_THREE_007
SQL> 2 10.5
SQL> SQL> FILE_4
SQL> 2 -999998
I need a script to get the following data with the format:
Mon Jun 16 10:30:00 2011, 007,98767, 12345.5, 109.5
I have tried the following:
gawk " / Production on / {print $6, $7, $8, $9, $10 }" test.txt, and got the first part:
Mon Jun 16 10:30:00 2011
but I think that there is other way to get it also instead of that i used, also I have no idea how to get the rest.
Any idea ? thanks a lot.
with regards