![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk: need to extract a line before a pattern | npn35 | Shell Programming and Scripting | 17 | 06-29-2008 10:38 PM |
| extract a particular start and end pattern from a line | manish205 | Shell Programming and Scripting | 7 | 02-07-2008 06:18 AM |
| Extract Pattern Sequence | jaganadh | Shell Programming and Scripting | 5 | 12-10-2007 11:06 AM |
| Extract if pattern matches | Raynon | Shell Programming and Scripting | 20 | 10-29-2007 04:44 AM |
| Please help! Sed extract a pattern | zhen | Shell Programming and Scripting | 11 | 09-18-2006 12:36 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Extract the Pattern
Hello All,
can anyone help me out in extracting the pattern from a file... The Input file is: NFS B.11.11 ONC/NFS; Network-FileSystem,InformationServices,Utilities|123 NParProvider B.11.11.01.04.01.01 nPartition Provider|456 NPartition A.01.02 Enhanced NPartition Commands/789 Networking B.11.11 HP-UX_Lanlink_Product|1111 NisLdapServer B.04.00.02 The NIS/LDAP Gateway (ypldapd)|2222 I need to extract the pattern ypldapd from the fifth line which is enclosed between the brackets.. I need a script in ksh Thanks in Advance |
|
||||
|
The first part of the sed statement is to extract the line containing the pattern, So 1,4d or '/NisLdapServer/!d will delete all the lines except for the 5th line and then the second part i am extracting the pattern inbetween the braces
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|