The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-06-2006
shriashishpatil shriashishpatil is offline
Registered User
 

Join Date: Dec 2005
Location: Pune
Posts: 78
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
Reply With Quote
Remove advertisements
!!
Forum Sponsor