Finding a Particular Pattern From a File in UNIX [message #556529] |
Tue, 05 June 2012 02:35 |
sonudev
Messages: 26 Registered: November 2009 Location: bangalore
|
Junior Member |
|
|
Hi,
Suppose I have a file with many lines as follows. Now I want to find the following questions from the file through shell script or commands.
File name is abc.txt
My name is XYZ.
XYZ works for GHT and XYZ is part of PES.
GHT is a good organization.
XYZ knows swimming. XYZ is also very keen in reading.
XYZ is a very hardworking guy.
Now, (i) How many occurrences of XYZ are there?
(ii) Print lines where XYZ occurrence is more than 1.
(iii) Print lines which start with XYZ
Thanks for valuable inputs.
|
|
|
Re: Finding a Particular Pattern From a File in UNIX [message #556540 is a reply to message #556529] |
Tue, 05 June 2012 03:24 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
This question bears no real connection with Oracle database.
Please find a more appropriate forum.
The topic is locked.
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).
Regards
Michel
|
|
|