Home » Infrastructure » Unix » Finding a Particular Pattern From a File in UNIX (AIX)
Finding a Particular Pattern From a File in UNIX [message #556529] Tue, 05 June 2012 02:35 Go to next message
sonudev
Messages: 18
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 Go to previous message
Michel Cadot
Messages: 58599
Registered: March 2007
Location: Nanterre, France, http://...
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
Previous Topic: Solaris compatablity version for oracle database-11.2.0.3
Next Topic: Getting ip of the host which initiated creation of a dedicated process
Goto Forum:
  


Current Time: Mon Jul 28 03:24:41 CDT 2014

Total time taken to generate the page: 0.33668 seconds