07-13-2011
Thanks buddyy....
I know my mistake... I was giving spacebar between the two options... as a result it was not working... Now its working.. :-)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
I have a file called Archiver1.gz
how to view this file without doing gunzip on it i.e. decompressing it
i tried this command but its not working:
gzcat Archiver1.gz | tail -10 (4 Replies)
Discussion started by: ali560045
4 Replies
2. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
3. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Discussion started by: gagan4599
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Iam new to unix, I need to find string and replace it in the file name. Like
text_123_0.txt,text_123_1.txt,text_123_2.txt. I need to search 123 and replace it with 234 . Is there any unix command to replace them in single command since i have 5 directories. So i need to go each and every... (0 Replies)
Discussion started by: etldeveloper
0 Replies
6. Shell Programming and Scripting
Hi guys,
I need to find multiple strings within files under a directory and secondly, to count how many files are there with these strings.
At present, i am able to do this in order to find one string (for example "abc"):
find <path> -exec grep "abc" {} /dev/null \;
Now for example, i... (2 Replies)
Discussion started by: frum
2 Replies
7. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
8. Shell Programming and Scripting
Hi All,
I want to use egrep on multiple files and the results should be output to multiple files. I am using the below code in my shell script(working in Ksh shell). However with this code I am not attaining the desired results.
#!/bin/ksh
(
a="/path/file1"
b="path/file2"
for file in... (4 Replies)
Discussion started by: am24
4 Replies
9. UNIX for Beginners Questions & Answers
This is my problem, I am using the following code to extract the file names with specific strings 0.01:
find ./ -name "*.txt" -exec grep -H '0.01' {} +
It works wonders with a small sample. However, when I use it in a real scenario it produces an empty file -even though I am sure there are... (11 Replies)
Discussion started by: Xterra
11 Replies
10. UNIX for Beginners Questions & Answers
Hello Everyone ,
Iam a newbie to shell programming and iam reaching out if anyone can help in this :-
I have two files
1) Insert.txt
2) partition_list.txt
insert.txt looks like this :-
insert into emp1 partition (partition_name)
(a1,
b2,
c4,
s6,
d8)
select
a1,
b2,
c4, (2 Replies)
Discussion started by: nubie2linux
2 Replies
LEARN ABOUT DEBIAN
file::find::rule::vcs
File::Find::Rule::VCS(3pm) User Contributed Perl Documentation File::Find::Rule::VCS(3pm)
NAME
File::Find::Rule::VCS - Exclude files/directories for Version Control Systems
SYNOPSIS
use File::Find::Rule ();
use File::Find::Rule::VCS ();
# Find all files smaller than 10k, ignoring version control files
my @files = File::Find::Rule->ignore_vcs
->file
->size('<10Ki')
->in( $dir );
DESCRIPTION
Many tools need to be equally useful both on ordinary files, and on code that has been checked out from revision control systems.
File::Find::Rule::VCS provides quick and convenient methods to exclude the version control directories of several major Version Control
Systems (currently CVS, subversion, and Bazaar).
File::Find::Rule::VCS implements methods to ignore the following:
CVS
Subversion
Bazaar
In addition, the following version control systems do not create directories in the checkout and do not require the use of any ignore
methods
SVK
Git
METHODS
ignore_vcs
# Ignore all common version control systems
$find->ignore_vcs;
# Ignore a specific named version control systems
$find->ignore_vcs($name);
# Ignore nothing (silent pass-through)
$find->ignore_vcs('');
The "ignore_vcs" method excludes the files for a named Version Control System from your File::Find::Rule search.
If passed, the name of the version control system is case in-sensitive. Names currently supported are 'cvs', 'svn', 'subversion', 'bzr',
and 'bazaar'.
As a convenience for high-level APIs, if the VCS name is the defined null string '' then the call will be treated as a nullop.
If no params at all are passed, this method will ignore all supported version control systems. If ignoring every version control system,
please note that any legitimate directories called "CVS" or files starting with .# will be ignored, which is not always desirable.
In widely-distributed code, you instead should try to detect the specific version control system used and call ignore_vcs with the specific
name.
Passing "undef", or an unsupported name, will throw an exception.
ignore_cvs
The "ignore_cvs" method excluding all CVS directories from your File::Find::Rule search.
It will also exclude all the files left around by CVS after an automated merge that start with '.#' (dot-hash).
ignore_rcs
The "ignore_rcs" method excluding all RCS directories from your File::Find::Rule search.
It will also exclude all the files used by RCS to store the revisions (end with ',v').
ignore_svn
The "ignore_svn" method excluding all Subversion (".svn") directories from your File::Find::Rule search.
ignore_bzr
The "ignore_bzr" method excluding all Bazaar (".bzr") directories from your File::Find::Rule search.
ignore_git
The "ignore_git" method excluding all Git (".git") directories from your File::Find::Rule search.
ignore_hg
The "ignore_hg" method excluding all Mercurial/Hg (".hg") directories from your File::Find::Rule search.
TO DO
- Add support for other version control systems.
- Add other useful VCS-related methods
SUPPORT
Bugs should always be submitted via the CPAN bug tracker
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-VCS>
For other issues, contact the maintainer
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
<http://ali.as/>, File::Find::Rule
COPYRIGHT
Copyright 2005 - 2010 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.1 2010-10-06 File::Find::Rule::VCS(3pm)