Splitting file
- From: AFC <annecarterfredi@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 09:56:17 -0700
I have a file with 150,000+ lines. Text in the file have this pattern:
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
..
..
..
What I need to do is to make two files by moving all double lines
(after an empty line) to one file and all tripple lines to another
file.
So, one file has:
UPDATE TABLE1 SET ...
The SQL command completed successfully.
UPDATE TABLE1 SET ...
The SQL command completed successfully.
..
..
..
and another file has:
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
UPDATE TABLE1 SET ...
No row was found for FETCH, UPDATE or DELETE; or the result of a
query is an empty table.
..
..
..
What command should I use to achieve this...Thanks for your help.
.
- Follow-Ups:
- Re: Splitting file
- From: Janis Papanagnou
- Re: Splitting file
- Prev by Date: Re: Random list of filenames
- Next by Date: Re: Splitting file
- Previous by thread: How split the input path into components
- Next by thread: Re: Splitting file
- Index(es):
Relevant Pages
|