![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Search and Parse string from inside a File | SSims | UNIX for Dummies Questions & Answers | 2 | 11-08-2007 03:50 PM |
| how to search string and number in one file and check in the other file | knshree | Shell Programming and Scripting | 9 | 08-24-2007 05:29 AM |
| How to search a string in a file. | prathap | UNIX for Dummies Questions & Answers | 1 | 07-17-2007 03:41 AM |
| String search in log file | sliver | Shell Programming and Scripting | 1 | 07-12-2006 08:09 AM |
| appending string to text file based on search string | malaymaru | Shell Programming and Scripting | 1 | 06-09-2006 09:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
please help me to search string in a file ......
Dear Friends,
Please tell me the shell command to find desired string in a file.... for example, file1.txt contains following text(please note that all the following tags are in single line) ---------------------------- <aaa> some text1</aaa><bbb> some text2</bbb><ccc> some text3</ccc><kkk>W/X12345</kkk><ddd> some text4</ddd><eee> some text5</eee><fff> some text6</fff><ggg> some text7</ggg><hhh> some text8</hhh> ---------------------------- please tell me how to extract "W/X12345" from the above file content..? this paramenter,W/X12345, length may not be constant, some times it may be W/X123 or W/X87789989 or W/X90798897989 ect... please tell me how do I get this paramenter? Please help as soon as possible. Thanks in Advance.. swamymns |
|
||||
|
please help me to search string in a file ......
Dear aigles, thanks for ur reply,
but I am very sorry, I have missed one important point in my previous mail. please pardon me for that. file1.txt contains following text(please note that all the following tags are in single line) ---------------------------- <aaa> some text1</aaa><bbb> some text2</bbb><ccc> some text3</ccc><kkk>W/X12345</kkk><ddd> some text4</ddd><eee> some text5</eee><fff> some text6</fff><kkk>3333</kkk><ggg> some text7</ggg><hhh> some text8</hhh> ---------------------------- please see that above file conatins "<kkk>" twice. i.e., <kkk>W/X12345</kkk> and <kkk>3333</kkk> I have to extract the entire string that starts with "W/X" till the end tag("</kkk>") i.e., I need to extract "W/X12345" this paramenter,W/X12345, length may not be constant, some times it may be W/X123 or W/X87789989 or W/X90798897989 ect... please tell me how do I get this paramenter? waiting for ur reply, swamymns |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|