09-30-2008
How to find a word in a all the files in a Directory??
I want to find a specific word present in all the files ina directory....Please tell me the command to be used??
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi
can i know how to get the file name of any files containing for example "abc" from a number of files in a directory?
i tried "ls -ltrc | grep abc" but no resulted generated.
thanks in advance. (1 Reply)
Discussion started by: legato
1 Replies
2. Shell Programming and Scripting
I'm looking to write a ksh code with will be alble to find a word like 'toto' in all files going from my current directory.
eg.
/doc ----------->have: text.c which "toto"
/doc/usr-------->have: build.pc, help.java which "toto"
/doc/usr/cach -->have: test.sh which "toto"
/doc/build... (4 Replies)
Discussion started by: yeclota
4 Replies
3. Shell Programming and Scripting
Hello,
I have several files in a specific directory.
A specific string in one file can occur in another files.
If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string.
Example.
file1
ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies
4. Shell Programming and Scripting
Hi Everyone,
I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap".
For Example:
In the Directory,
$pwd
/home/nick
$ grep -l "xsgd1234dap" *.sh | wc -l
119
I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies
5. Shell Programming and Scripting
Suppose i have a word "mail".
I have to search this word in all files inside a directory and it's sub-directories.
It will also search in all hidden directory and sub-directories.
If it finds this word in any file it will list that file.
How can i do this with perl/ruby/awk/sed/bash or... (9 Replies)
Discussion started by: cola
9 Replies
6. UNIX for Dummies Questions & Answers
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
7. Shell Programming and Scripting
Hi folks,
i have a file in which i have words like below
words.txt(file name) and words are arranged likes no spaces between words
Apple
Banana
Carrot
And i have list files which have these words in a directory (/tmp/satemp)
test1.txt
test2.txt
test3.txt
So if the word 'Apple' is... (3 Replies)
Discussion started by: coolboy98699
3 Replies
8. Shell Programming and Scripting
he following are the files available in my directory
RSK_123_20141113_031500.txt
RSK_123_20141113_081500.txt
RSK_126_20141113_041500.txt
RSK_126_20141113_081800.txt
RSK_128_20141113_091600.txt
Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies
9. Shell Programming and Scripting
I need to find a word '% Retail by State' in the folder /usr/sas/reports/RetailSalesTaxallocation.
When I tried like below,
-bash-4.1$ cd /usr/sas/reports/RetailSalesTaxallocation
-bash-4.1$ find ./ -name % Retail by State
find: paths must precede expression: Retail
Usage: find ... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies
10. Shell Programming and Scripting
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
UDM_FIND(3) 1 UDM_FIND(3)
udm_find - Perform search
SYNOPSIS
resource udm_find (resource $agent, string $query)
DESCRIPTION
Performs a search.
The search itself. The first argument - session, the next one - query itself. To find something just type words you want to find and press
SUBMIT button. For example, "mysql odbc". You should not use quotes " in query, they are written here only to divide a query from other
text. mnoGoSearch will find all documents that contain word "mysql" and/or word "odbc". Best documents having bigger weights will be dis-
played first. If you use search mode ALL, search will return documents that contain both (or more) words you entered. In case you use mode
ANY, the search will return list of documents that contain any of the words you entered. If you want more advanced results you may use
query language. You should select "bool" match mode in the search from.
PARAMETERS
o $agent
- A link to Agent, received after call to udm_alloc_agent(3).
o $query
- mnoGoSearch understands the following boolean operators: & - logical AND. For example, "mysql & odbc". mnoGoSearch will find
any URLs that contain both "mysql" and "odbc". | - logical OR. For example "mysql|odbc". mnoGoSearch will find any URLs, that
contain word "mysql" or word "odbc". ~ - logical NOT. For example "mysql & ~odbc". mnoGoSearch will find URLs that contain word
"mysql" and do not contain word "odbc" at the same time. Note that ~ just excludes given word from results. Query "~odbc" will
find nothing! () - group command to compose more complex queries. For example "(mysql | msql) & ~postgres". Query language is
simple and powerful at the same time. Just consider query as usual boolean expression.
RETURN VALUES
Returns a result link identifier on success or FALSE on failure.
PHP Documentation Group UDM_FIND(3)