searching word in files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers searching word in files
# 1  
Old 11-06-2006
searching word in files

hi all
i want to search some word in file but i want that it will search in all the files that i have
in all the directories i do'nt know the name of the file
i know that grep command want some specified file
in which command shell i used
thanks
# 2  
Old 11-06-2006
searching word in files

hi all
i want to search some word in file but i want that it will search in all the files that i have
in all the directories i do'nt know the name of the file
i know that grep command want some specified file
in which command shell i used
thanks
# 3  
Old 11-06-2006
Dont duplicate threads. I have merged your threads.

Here is one version of the find solution.
Code:
find . -name "*.*" -exec grep "search string" {} /dev/null \;

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find a word and increment the number in the word & save into new files

Hi All, I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl: run_build_model sparc_ifu_dec run_drc set_faults -model path_delay -atpg_effectiveness -fault_coverage add_delay_paths P1 set_atpg -abort_limit 1000 run_atpg -ndetects 1000 I would like... (6 Replies)
Discussion started by: jypark22
6 Replies

2. Shell Programming and Scripting

start searching a word from the particular record on the result of first occurence change the value

Hi, I need a script to start searching a word from the particular record on the result of first occurence i need to change the value in that record. I have a input file like this <properties> <add key="DeliveryWithinDay" value="False" /> <add key="ABC" value="23:00:00 PM" /> <add... (5 Replies)
Discussion started by: NareshN
5 Replies

3. Shell Programming and Scripting

Help with searching a word,find the identifier under which it is there and giving a report

Hi, i have a directory structure which contains few files each. each file in turn has some functions. i'm searching for a word, say 'pen' in all the files present in all the directories. :wall: consider a file file1.c in Dir1. out of the 3 funcs present in this file, func1(pennum) and... (3 Replies)
Discussion started by: i.srini89
3 Replies

4. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

5. Shell Programming and Scripting

Searching a word in multiple files

Hi All, I have a issue in pulling some heavy records , I have my input file has 10,000 records which i need to compare with daily appended log files from (sep 1st 2009 to till date) . I tried to use grep fgrep and even sed , but the as time is factor for me , i cannot wait for 5 days to get the... (3 Replies)
Discussion started by: rakesh_411
3 Replies

6. Shell Programming and Scripting

Insert tags in lines after searching for a word

Hi, I am new to Unix and this is my first post on this forum. I am trying to convert a file into an xml. In my input I want to search for any line that starts with a 'F' and make it a tag in the xml. See below for the input and output. Input : <Payment> <REFERENCE>78</REFERENCE> F123 : ... (7 Replies)
Discussion started by: akashgov
7 Replies

7. Shell Programming and Scripting

searching in a while where a word is not there.

Hi, I am new to unix, pls help I have a file suc_Logfile file. liek this. output success success abc Now i need to generate a file in shell script where it shows only abc. Now i am doing like this grep "^successfully\|$" $suc_Logfile >> $Final_Suc Pls help. Thanks,... (6 Replies)
Discussion started by: sailaja_80
6 Replies

8. UNIX for Dummies Questions & Answers

Searching mutiple word - Tuning grep command

Hi all, I have a log file which is more than 1GB, i need to take count from the log file for two strings. i am using the below command but it take a long time to excetue, i need to tune this. Please help me cat /logs/gcbs/gcbsTrace.log | grep -i "ViewStatementBusinessLogic" | grep -c -i... (8 Replies)
Discussion started by: senthilkumar_ak
8 Replies

9. Shell Programming and Scripting

Searching word in a file with awk

Hello everyone! I use a script to query for installed packages with yum (I use RHEL 4 with yum installed) and the output is redirected to a file. My script scan this file to find a package and the version of it. The script works fine until I search for a package name with special characters.... (3 Replies)
Discussion started by: studieu
3 Replies

10. UNIX for Dummies Questions & Answers

Searching for key word within a file

Hello, I have a directory that holds all of my matlab codes. I am trying to run a searh on all of the matlab files that have the word "while" written inside the sytax of the code. Looking for all of the times that I did a while loop. Can someone help me do this? Thanks in advance. ... (1 Reply)
Discussion started by: moradwan
1 Replies
Login or Register to Ask a Question