![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to read file into variable | aspect_p | Shell Programming and Scripting | 7 | 03-21-2008 08:12 AM |
| How to read the configuration file from shell script | nishanth hampal | Shell Programming and Scripting | 7 | 02-26-2008 11:42 PM |
| Urgent: selecting unique specific content of a file using shell script | jisha | Shell Programming and Scripting | 2 | 01-08-2008 04:45 AM |
| Read variable from file in a C shell script | haouesse | Shell Programming and Scripting | 2 | 11-07-2006 05:34 AM |
| How to read specific lines in a bulk file using C file Programming | rajan_ka1 | High Level Programming | 10 | 11-09-2005 11:29 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Shell Script to read specific lines in a file
I have a file with contents as follows
Record 1: Rejected - Error on table "DWO"."P2G_CUST_EVENTS". ORA-00001: unique constraint (DWO.CUST_EVENTS_PK) violated Record 5: Rejected - Error on table "DWO"."P2G_CUST_EVENTS". ORA-00001: unique constraint (DWO.CUST_EVENTS_PK) violated Record 6: Rejected - Error on table "DWO"."P2G_CUST_EVENTS". ORA-00256: integrity constraint (DWO.CUST_EVENTS_PK) violated Record 7: Rejected - Error on table "DWO"."P2G_CUST_EVENTS". ORA-00001: unique constraint (DWO.CUST_EVENTS_PK) violated Now I need to find the record numbers against the rows having unique constraints. The data is present in 2 seperate lines, where the record number is present in the frist line and the Oracle Error in the subsequent line I need to get the values as follows in a file 1 5 7 because these are the record numbers of the rows having unique constraint errors. I would like to know how to do it in shell scripting. |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
|
|
|||
|
Quote:
|