The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Word count of lines ending with certain word warlock129 Shell Programming and Scripting 8 08-30-2009 04:37 AM
Sed or awk cut all lines after word Trump Shell Programming and Scripting 7 03-25-2009 08:42 PM
how to grep the word and display only the second word from it prsam UNIX for Dummies Questions & Answers 11 12-17-2008 01:06 PM
how to grep for a word and display only the word ananthmm UNIX for Dummies Questions & Answers 6 05-29-2008 09:00 AM
GREP:Output all lines containing word ljubayuu Shell Programming and Scripting 3 04-06-2006 11:21 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 3 Weeks Ago
dilipr25 dilipr25 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 3
Question grep lines containing a word only twice.

Hi,

I have a query on using grep options. I tried with several options but unable to do it.

lanite:52> cat note
123 456 ab 123
ab cv 234 4566 67
ab gh tij ab 12 34 ab
ab cv dfgv ab cv ab kjhk ab ghj
sdf
dfg ab jljklj ab

Now, I need to use grep to find the line which contains the word "ab" exactly twice. Please help me.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0