How to recursively search for a list of keywords in a given directory?
Hi all,
how to recursively search for a list of keywords in a given directory??
for example:
suppose i have kept all the keywords in a file called "procnamelist" (in separate line)
and i have to search recursively in a directory called "target/dir"
if i am not doing recursive search then the below command is working. but when i am using the below command for the recursive search, its throwing error as "bad option -r" or
not working.
please help .
Last edited by Franklin52; 05-14-2012 at 05:24 PM..
Reason: Please use code tags for data and code samples, thank you
Hi,
I have a file which contains the following :
select * from test where test_id=1;
select id
from test1, test2 where test_id=1 and test_id=2;
select * from
test1, test2, test3 where test_id=4 and test2_id where in (select test2_id from test2);
select
id1, id2 from test ... (6 Replies)
Hi all,
I am looking for a coomand to search for the keywords in susequenct lines. Keyword1 in a line and Keyword2 in the very next line.
Once i found the combination ineed to print the lines with patterns and the line above and one below.
I am giving an example here: Keywords are :ERROR and... (12 Replies)
Hi,
I'm the new user of linux/unix. Can I ask that anybody know how to use the linux/unix shortcut key to search a specific file from a list of directory?
For example, I know the file name that I want to search. But I forget which directory or location is my desired file put.Got any shortcut... (7 Replies)
I have a huge list of files in an Unix directory (around 10000 files).
I need to be able to search for a certain keyword only within files that are modified between certain date and time, say for e.g 2012-08-20 12:30 to 2012-08-20 12:40
Can someone let me know what would be the fastest way... (10 Replies)
have a very big file where need to format it like below
example file:
abcd today
is
great
day;
search keyword 'abcd' and append to it all words till we reach ; to make it a single line.
output should look like.
abcd today is great day;
There are many occurrence of such... (2 Replies)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
I have ~100 text files in a directory that I am trying to parse and output to a new file. I am looking for the words chr,start,stop,ref,alt in each of the files. Those fields should appear somewhere in those files. The first two fields of each new set of rows is also printed. Since this is on a... (7 Replies)
Hi All,
I hope somebody would be able to help me.
I would need to search a string coming from a file, example file.txt:
dog
cat
goat
horse
fish
For every string, I would need to know if there are any files inside a directory(recursively) that contains the string regardless of case.... (9 Replies)
Perl::Critic::Policy::Miscellanea::RequireRcsKeywords(3)User Contributed Perl DocumentatioPerl::Critic::Policy::Miscellanea::RequireRcsKeywords(3)NAME
Perl::Critic::Policy::Miscellanea::RequireRcsKeywords - Put source-control keywords in every file.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Every code file, no matter how small, should be kept in a source-control repository. Adding the magical RCS keywords to your file helps
the reader know where the file comes from, in case he or she needs to modify it. This Policy scans your file for comments that look like
this:
# $Revision: 4106 $
# $Source: /myproject/lib/foo.pm $
A common practice is to use the "Revision" keyword to automatically define the $VERSION variable like this:
our ($VERSION) = '$Revision: 4106 $' =~ m{ $Revision: s+ (S+) }x;
CONFIGURATION
By default, this policy only requires the "Revision", "Source", and "Date" keywords. To specify alternate keywords, specify a value for
"keywords" of a whitespace delimited series of keywords (without the dollar-signs). This would look something like the following in a
.perlcriticrc file:
[Miscellanea::RequireRcsKeywords]
keywords = Revision Source Date Author Id
See the documentation on RCS for a list of supported keywords. Many source control systems are descended from RCS, so the keywords
supported by CVS and Subversion are probably the same.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-10 Perl::Critic::Policy::Miscellanea::RequireRcsKeywords(3)