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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-14-2009
Banned
 

Join Date: Oct 2009
Posts: 10
can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello"

i want to achieve it with the grep command but not with the grep *
Sponsored Links
  #2 (permalink)  
Old 10-14-2009
danmero danmero is offline Forum Advisor  
 

Join Date: Nov 2007
Location: H3X
Posts: 1,566

Code:
find . \( -name . -o -prune \) -type f -exec grep -l hello {} \;

  #3 (permalink)  
Old 10-14-2009
Banned
 

Join Date: Oct 2009
Posts: 10
thnx a lot....
Sponsored Links
Reply

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Grep command in shell script prasannasupp Shell Programming and Scripting 3 09-02-2009 09:11 AM
Passing parameters to Shell script for GREP command sud.tech Shell Programming and Scripting 1 12-23-2008 08:32 AM
searching using grep command prakash.gr Shell Programming and Scripting 9 12-15-2008 04:30 AM
Searching mutiple word - Tuning grep command senthilkumar_ak UNIX for Dummies Questions & Answers 8 08-13-2008 04:25 AM
how to get the output of a grep command to a file inside a shell script kripssmart UNIX for Dummies Questions & Answers 1 06-16-2008 04:12 PM



All times are GMT -4. The time now is 08:56 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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0