First of all, you shouldn't bump up questions, because it is against the rules.
Second: please notice that this is not a help desk. If you want informed, precise answers to be given within a certain timeframe please consider hiring an UNIX expert.
Third: please bear in mind, that all people answering here are VOLUNTEERS. They might be (in fact they are) most times interested in helping you or someone else but they are not obligated to do so. If they do not feel like it (and, frankly, exhibiting a demanding attitude like you did makes them not feeling like it more likely) they do not have to answer at all.
Fourth: all these boards are about is helping one to help himself. Right now you have shown more effort in getting us to work faster than in solving your problems yourself. Take this as an opportunity to think over (and perhaps rearrange) your priorities.
/Moderative Mode OFF, User Mode ON
There is a simple answer to your problem: probably it could be solved with a finite effort and a little sed-scripting.
Longer answer: the real problem lies perhaps in the analysis of the problem and in formulating a solution which is general and reliable enough to let it run unsupervised. For this there are simply not enough data.
Some questions you will have to answer: you have provided a file with exactly one error. How would a file look like when there are two (any arbitrary number of) errors? How does the file look like when there are no errors at all? How will the file look like when there are different types of errors (say, the load stops midways because of some error - file error, disk full, what else)?
A stable and reliable script would be able to parse all these types of output (in fact it should be able to cope with every possible output) therefor you have to take all these different (?) output formats into account.
So please give more details and maybe we can work out a script that does exactly that or try to write one yourself. Provided that the problems mentioned above can be overcome here is a way to isolate your needed values:
You search for a specific value (for the sake of the example we will use start_time) and you know how the line looks like which contains this value:
You can search for this line easily with sed. Now replace the fixed text part "Run began on" with the variable name you want to assign it to to form a declaration:
And you will notice that from your logfile you will get out a single declaration reading:
This declaration you could directly use to initialize some variables in your script (source the file written this way in).
I hope this helps.
bakunin
Thanks for your response and please do forgive me about my bad behavior..
It's just that I feel my question is not that complicated but yet not one seems to answer..
While waiting for the solution, I take my own iniative to study a bit about awk utility.
So, this is what I got:
All the awk command works fine:
So, where i do went wrong in the script to set all that awk commands as a variable?
I'm having a oracle server and i'm having a table in that.
I'm having a linux server which is in network with the oracle server. I need to write a c program in linux env when on execution loads the table with the text file given as input.
Please explain me the flow of process in that and also... (6 Replies)
Hi,
I have delimited file(|).
Sample data:
1|name|50009|DS24|0|12
2|name|30009|DS24|0|13
3|name|20409|DS24|0|14
4|name|20009|DS24|0|15
5|name|10009|DS24|0|16
I want to load this data into a oracle table (update and insert)
Please help me the commands and also... (1 Reply)
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time then Go to sleep mode and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Hi,
I am trying to insert a record into a table (say dips_tbl) which resides in Oracle DB through a ksh script. I want to insert records into few of the table columns-not all. I'll give an e.g. for the date column "CREATE_DATE".
For that I first execute
SQL1="SELECT SYSDATE FROM DUAL"
... (1 Reply)
Hi All,
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
Eg: insert into tbl_daily_status values(STAT,ENDTIME);
Please help me on this.
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do... (8 Replies)
hi,
i need to copy one table with data into another table,
right now am using
create table table1 as select * from table2
i want the constraints of table1 to be copied to table2 also , can anyone give me some solution to copy the constraints also, now am using oracle 10.2.0.3.0... (1 Reply)
I need to create the shell script load the few 100 table using the SQLLDR.
Need to generate the control file for each table using oracle table.
table has "table names" and "column names" using this need create the control file.
example table rows below
table_nme column_nme
DEPT ... (2 Replies)