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
how to use find commnad to show only path of the result umen UNIX for Dummies Questions & Answers 1 02-05-2008 03:22 AM
Finding files with names that have a real number greater then difined. harmonwood Shell Programming and Scripting 2 11-09-2007 10:28 AM
[awk]: Row begins by random number and field 10 is greater than 10.00% Lomic Shell Programming and Scripting 3 03-18-2005 09:59 AM
Need ls to show number of lines in each file GMMike UNIX for Dummies Questions & Answers 1 11-19-2004 05:53 AM
Making Emacs to show line number saurya_s UNIX for Dummies Questions & Answers 9 01-28-2004 01:32 PM

Closed Thread
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
  #1 (permalink)  
Old 12-05-2007
umen umen is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 239
Show result only if number is greater then

Hello all
Im trying to write one liner that will show me results only if the result of the expression is greater then 0
For example:
I do :
PHP Code:
find . -name "*.dsp" xargs grep -c SecurityHandler 
the result are 

 ./
foo/blah/a.dsp:0
./foo/blah1/b.dsp:1
./foo/blah2/c.dsp:2
./foo/blah3/d.dsp:
Now I like to print only dsp's that the word " SecurityHandler" is more then 0
How can it be done?
  #2 (permalink)  
Old 12-05-2007
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,958

Code:
find . -name "*.dsp" | xargs grep -c SecurityHandler  | awk ' !/:0/ { print }'

Closed Thread

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 05:58 PM.


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