![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| extract x lines after a pattern - place each result in separate file | gobi | Shell Programming and Scripting | 5 | 06-06-2008 12:03 PM |
| extract field of characters after a specific pattern - using UNIX shell script | jansat | HP-UX | 2 | 05-27-2008 09:08 PM |
| nawk-how count the number of occurances of a pattern, when don't know the pattern | cyber111 | Shell Programming and Scripting | 2 | 05-11-2008 12:00 AM |
| Breaking output for specific pattern | shoeb_syed | UNIX for Dummies Questions & Answers | 2 | 03-08-2006 12:00 AM |
| Finding a specific pattern from thousands of files ???? | aarora_98 | Shell Programming and Scripting | 6 | 02-17-2006 04:28 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
to separate a specific pattern
Hi friends,
I have a file with following pattern. OBJECT TYPE="locale", NAME=locale_nl_NL, UNIQUE_FIELD=win32_lcid FIELDS clarify_lang = 0; END_FIELDS END_OBJECT NAME=locale_nl_NL OBJECT TYPE="locale", NAME=locale_nl_BE UNIQUE_FIELD=win32_lcid FIELDS iso_cntry = "BE"; END_FIELDS END_OBJECT NAME=locale_nl_BE I want to saparate lines starting with OBJECT till FIELDS. e.g. My o/p file should look like OBJECT TYPE="locale", NAME=locale_nl_NL, UNIQUE_FIELD=win32_lcid OBJECT TYPE="locale", NAME=locale_nl_BE UNIQUE_FIELD=win32_lcid How this can be done using perl/awk/sed?? thanks in advance, -Ashish |
| Forum Sponsor | ||
|
|