12-15-2009
Have you tried something like the following?
find . -exec egrep "(value1|value2)" '{}' \; >> Work.txt
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
below is an extract from my file and I am trying to use Awk and grep and a while loop to pull infomation from under neath "HBA WWN=".HBA WWN=" reoccurs all over the file but the 100000c.....number are unique and I want to be able to pull and reference specifi information under this header ever time... (2 Replies)
Discussion started by: kieranfoley
2 Replies
2. Programming
Hi,
I have two files formatted as following:
File 1: (user_num_ID , realID) (the NR here is 41671)
1 cust_034_60
2 cust_80_91
3 cust_406_4
..
..
File 2: (realID , clusterNumber) (total NR here is 1000)
cust_034_60 2
cust_406_4 3
..
.. (11 Replies)
Discussion started by: amarn
11 Replies
3. Shell Programming and Scripting
Hello,
I met a challenge to extract part of the table. I'd like to grep the first three matches based on field1 and field2. Input:
D A 92.85 1315 83 11
D A 95.90 757 28 3
D A 94.38 480 20 7
D A 91.21 307 21 6
D A 94.26 244 ... (6 Replies)
Discussion started by: yifangt
6 Replies
4. Shell Programming and Scripting
I'm probably sure I need to use either awk or sed judging by research but I'm not sure what exact command I have to do to do following...:wall:
So this is my text file
CPU 1 2 3 4 5 6
RAM 2 3 4 5 6 7
HAR 3 4 5 6 7 8
--------------
my input:
Cur_CPU=10
Cur_RAM=11
Cur_HAR=13
Desired... (5 Replies)
Discussion started by: simonirang
5 Replies
5. Shell Programming and Scripting
I'm trying to sum each field of the second column over many different files.
For example:
file1: file2:
1 5 1 5
2 6 2 4
3 5 3 3
To get:
file3
1 10
2 10
3 8
I found answer when there are only 2 files as... (10 Replies)
Discussion started by: rogeriog.em
10 Replies
6. Shell Programming and Scripting
Hi Everyone,
Im currently using the below code to pull data from a large CSV file and put it into smaller files with just the data associated with the number that I "grep".
grep 'M053' test.csv > test053.csv
Is there a way that I can use grep to run through my file like the example below... (6 Replies)
Discussion started by: TheStruggle
6 Replies
7. Shell Programming and Scripting
I have 133 .txt files in a directory that I am combining into 1 file. The problem is when I use awk or cat to combine the files I get out put like this:
output
85 138662360 KCNT1
86 138662962 KCNT1
82 138657053 KCNT1
83 138657635 KCNT1
95 138646881 KCNT1... (12 Replies)
Discussion started by: cmccabe
12 Replies
8. Shell Programming and Scripting
I/m a beginner so be easy. I have text files that live on an AIX server. The files come in and I've been charged with writing a shell script to email out that pulls the first date, and the last date of the file. I need to load these 2 dates into 2 separate variables. I can figure out the variables,... (13 Replies)
Discussion started by: mattadams1983
13 Replies
9. UNIX for Beginners Questions & Answers
Hi there,
I have data with similar structure as this:
CHR START-SNP END-SNP REF ALT PATIENT1 PATIENT2 PATIENT3 PATIENT4
chr1 69511 69511 A G homo hetero homo hetero
chr2 69513 69513 T C . hetero homo hetero
chr3 69814 69814 G C . . homo homo
chr4 69815 69815 C A hetero . . hetero
is... (10 Replies)
Discussion started by: daashti
10 Replies
10. UNIX for Beginners Questions & Answers
Hi, I have two TEST files t.xyz and a.xyz which have three columns each. a.xyz have more rows than t.xyz. I will like to output rows at which $1 and $2 of t.xyz match $1 and $2 of a.xyz. Total number of output rows should be equal to that of t.xyz.
It works fine, but when I apply it to large... (6 Replies)
Discussion started by: geomarine
6 Replies
LEARN ABOUT CENTOS
dumpvalue
Dumpvalue(3pm) Perl Programmers Reference Guide Dumpvalue(3pm)
NAME
Dumpvalue - provides screen dump of Perl data.
SYNOPSIS
use Dumpvalue;
my $dumper = Dumpvalue->new;
$dumper->set(globPrint => 1);
$dumper->dumpValue(*::);
$dumper->dumpvars('main');
my $dump = $dumper->stringify($some_value);
DESCRIPTION
Creation
A new dumper is created by a call
$d = Dumpvalue->new(option1 => value1, option2 => value2)
Recognized options:
"arrayDepth", "hashDepth"
Print only first N elements of arrays and hashes. If false, prints all the elements.
"compactDump", "veryCompact"
Change style of array and hash dump. If true, short array may be printed on one line.
"globPrint"
Whether to print contents of globs.
"dumpDBFiles"
Dump arrays holding contents of debugged files.
"dumpPackages"
Dump symbol tables of packages.
"dumpReused"
Dump contents of "reused" addresses.
"tick", "quoteHighBit", "printUndef"
Change style of string dump. Default value of "tick" is "auto", one can enable either double-quotish dump, or single-quotish by
setting it to """ or "'". By default, characters with high bit set are printed as is. If "quoteHighBit" is set, they will be quoted.
"usageOnly"
rudimentary per-package memory usage dump. If set, "dumpvars" calculates total size of strings in variables in the package.
unctrl
Changes the style of printout of strings. Possible values are "unctrl" and "quote".
subdump
Whether to try to find the subroutine name given the reference.
bareStringify
Whether to write the non-overloaded form of the stringify-overloaded objects.
quoteHighBit
Whether to print chars with high bit set in binary or "as is".
stopDbSignal
Whether to abort printing if debugger signal flag is raised.
Later in the life of the object the methods may be queries with get() method and set() method (which accept multiple arguments).
Methods
dumpValue
$dumper->dumpValue($value);
$dumper->dumpValue([$value1, $value2]);
Prints a dump to the currently selected filehandle.
dumpValues
$dumper->dumpValues($value1, $value2);
Same as "$dumper->dumpValue([$value1, $value2]);".
stringify
my $dump = $dumper->stringify($value [,$noticks] );
Returns the dump of a single scalar without printing. If the second argument is true, the return value does not contain enclosing
ticks. Does not handle data structures.
dumpvars
$dumper->dumpvars('my_package');
$dumper->dumpvars('my_package', 'foo', '~bar$', '!......');
The optional arguments are considered as literal strings unless they start with "~" or "!", in which case they are interpreted as
regular expressions (possibly negated).
The second example prints entries with names "foo", and also entries with names which ends on "bar", or are shorter than 5 chars.
set_quote
$d->set_quote('"');
Sets "tick" and "unctrl" options to suitable values for printout with the given quote char. Possible values are "auto", "'" and """.
set_unctrl
$d->set_unctrl('unctrl');
Sets "unctrl" option with checking for an invalid argument. Possible values are "unctrl" and "quote".
compactDump
$d->compactDump(1);
Sets "compactDump" option. If the value is 1, sets to a reasonable big number.
veryCompact
$d->veryCompact(1);
Sets "compactDump" and "veryCompact" options simultaneously.
set
$d->set(option1 => value1, option2 => value2);
get
@values = $d->get('option1', 'option2');
perl v5.16.3 2013-03-04 Dumpvalue(3pm)