The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Infinite Loop in Autosys while running a shell script, Manual run is fine sharmagaurav_2k Shell Programming and Scripting 2 09-04-2007 08:20 AM
How to find whenther given value is in betwwen min and Max in unix shell scripting pinky UNIX for Dummies Questions & Answers 5 07-27-2007 10:52 AM
Find term and extract till end of data Raynon Shell Programming and Scripting 4 04-17-2007 01:41 AM
find & sed -i work fine. Now need -i workaround for old OS. simonb Shell Programming and Scripting 3 11-20-2005 02:32 AM
UNIX find by time scripting budrito UNIX for Advanced & Expert Users 1 10-08-2004 05:19 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-30-2008
mrehman mrehman is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 1
Loop till you find a string in a file <-- Need Help New to Unix Scripting

Guys - I am new to Unix scripting and am in need for a script that does the following. I have bits and pieces created and tested but i am just having a little difficult time getting it all together.

- Loop through till it finds a string in a specific file.

Any help is greatly appreciated.

Regards,

Mus
  #2 (permalink)  
Old 01-30-2008
bobbygsk bobbygsk is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 90
To find a string in specific file :-
Quote:
grep <string to find> <filename>
To find a string in all the files in specific directory
Quote:
grep <string to find> *
To find a string in all the files in directories and sub directories.
Quote:
find . -type f -print | xargs grep <string to find>
Sponsored Links
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 07:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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