07-17-2009
That was absolutely brilliant! Thanks so much.
r.-
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi All,
I need to select only those records having a non zero record in the first column of a comma delimited file.
Suppose my input file is having data like:
"0","01/08/2005 07:11:15",1,1,"Created",,"01/08/2005"
"0","01/08/2005 07:12:40",1,1,"Created",,"01/08/2005"... (2 Replies)
Discussion started by: shashi_kiran_v
2 Replies
2. Shell Programming and Scripting
Hi friends :)
I am having a small problem and ur help is needed...
I have a long file from which i want to select only some portions after filtering (grep).
My file looks like :
header
xxyy
lmno
xxyy
wxyz
footer
header
abcd
xy
pqrs
footer
.
. (14 Replies)
Discussion started by: vanand420
14 Replies
3. Shell Programming and Scripting
All,
We receive a file with a large no of records (records can vary) and we have to split it into two files based on another file. e.g.
File1:
UHDR 2008112
"25187","00000022","00",21-APR-1991,"" ,"D",-000000519,+0000000000,"C", ,+000000000,+000000000,000000000,"2","" ... (2 Replies)
Discussion started by: er_ashu
2 Replies
4. Shell Programming and Scripting
Dear list
its my first post and i would like to greet everyone
What i would like to do is select records 7 and 11 from each files in a folder then run an executable inside the script for the selected parameters.
The file format is something like this
7 100 200
7 100 250
7 100 300 ... (1 Reply)
Discussion started by: Gtolis
1 Replies
5. Shell Programming and Scripting
Hello:
I am new to shell script programming. Now I would like to select specific records block from a file. For example, current file "xyz.txt" is containing 1million records and want to select the block of records from line number 50000 to 100000 and save into a file. Can anyone suggest me how... (3 Replies)
Discussion started by: nvkuriseti
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am looking for an awk script which should help me to meet the following requirement:
File1 has records in following format
INF: FAILEd RECORD AB1234
INF: FAILEd RECORD PQ1145
INF: FAILEd RECORD AB3215
INF: FAILEd RECORD AB6114
............................ (2 Replies)
Discussion started by: mintu41
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I would like to know how can I select lines of one file based on a common ID column from another file (keeping the order of the second file).
Example of file1:
ID A B C D
1-30 1 2 3
5-60 4 5 6
1-20 7 8 9
Example of file2:
ID chr pos
1-20 1 20
1-30 1 30
5-60 5 60
Desired... (2 Replies)
Discussion started by: fadista
2 Replies
8. Shell Programming and Scripting
Hello,
I use UBUNTU 12.04.
I want to write a short program using awk to select some lines in a file based on a second file.
My first file has this format with about 400,000 lines and 47 fields:
SNP1 1 12.1
SNP2 1 13.2
SNP3 1 45.2
SNP4 1 23.4
My second file has this format:
SNP2
SNP3... (1 Reply)
Discussion started by: Homa
1 Replies
9. Shell Programming and Scripting
Hi
I have two files one.txt and two.txt
one.txt
123
324
456
235
456
two txt
abc one 000 123 abc
abc one 000 456 abc
abc one 000 122 abc
abc one 000 111 abc
My question here is, the records which are present in one.txt has to deleted in second file two.txt
my output result... (2 Replies)
Discussion started by: Ganesh L
2 Replies
10. Shell Programming and Scripting
I have a file, named records.txt, containing large number of records, around 0.5 million records in format below:
28433005 1 1 3 2 2 2 2 2 2 2 2 2 2 2
28433004 0 2 3 2 2 2 2 2 2 1 2 2 2 2
...
Another file is a key file, named key.txt, which is the list of some numbers in the first column of... (5 Replies)
Discussion started by: zenongz
5 Replies
LEARN ABOUT MOJAVE
data::dumper::concise5.18
Data::Dumper::Concise(3) User Contributed Perl Documentation Data::Dumper::Concise(3)
NAME
Data::Dumper::Concise - Less indentation and newlines plus sub deparsing
SYNOPSIS
use Data::Dumper::Concise;
warn Dumper($var);
is equivalent to:
use Data::Dumper;
{
local $Data::Dumper::Terse = 1;
local $Data::Dumper::Indent = 1;
local $Data::Dumper::Useqq = 1;
local $Data::Dumper::Deparse = 1;
local $Data::Dumper::Quotekeys = 0;
local $Data::Dumper::Sortkeys = 1;
warn Dumper($var);
}
So for the structure:
{ foo => "bar
baz", quux => sub { "fleem" } };
Data::Dumper::Concise will give you:
{
foo => "bar
baz",
quux => sub {
use warnings;
use strict 'refs';
'fleem';
}
}
instead of the default Data::Dumper output:
$VAR1 = {
'quux' => sub { "DUMMY" },
'foo' => 'bar
baz'
};
(note the tab indentation, oh joy ...)
If you need to get the underlying Dumper object just call "DumperObject".
Also try out "DumperF" which takes a "CodeRef" as the first argument to format the output. For example:
use Data::Dumper::Concise;
warn DumperF { "result: $_[0] result2: $_[1]" } $foo, $bar;
Which is the same as:
warn 'result: ' . Dumper($foo) . ' result2: ' . Dumper($bar);
DESCRIPTION
This module always exports a single function, Dumper, which can be called with an array of values to dump those values.
It exists, fundamentally, as a convenient way to reproduce a set of Dumper options that we've found ourselves using across large numbers of
applications, primarily for debugging output.
The principle guiding theme is "all the concision you can get while still having a useful dump and not doing anything cleverer than setting
Data::Dumper options" - it's been pointed out to us that Data::Dump::Streamer can produce shorter output with less lines of code. We know.
This is simpler and we've never seen it segfault. But for complex/weird structures, it generally rocks. You should use it as well, when
Concise is underkill. We do.
Why is deparsing on when the aim is concision? Because you often want to know what subroutine refs you have when debugging and because if
you were planning to eval this back in you probably wanted to remove subrefs first and add them back in a custom way anyway. Note that this
-does- force using the pure perl Dumper rather than the XS one, but I've never in my life seen Data::Dumper show up in a profile so "who
cares?".
BUT BUT BUT ...
Yes, we know. Consider this module in the ::Tiny spirit and feel free to write a Data::Dumper::Concise::ButWithExtraTwiddlyBits if it makes
you happy. Then tell us so we can add it to the see also section.
SUGARY SYNTAX
This package also provides:
Data::Dumper::Concise::Sugar - provides Dwarn and DwarnS convenience functions
Devel::Dwarn - shorter form for Data::Dumper::Concise::Sugar
SEE ALSO
We use for some purposes, and dearly love, the following alternatives:
Data::Dump - prettiness oriented but not amazingly configurable
Data::Dump::Streamer - brilliant. beautiful. insane. extensive. excessive. try it.
JSON::XS - no, really. If it's just plain data, JSON is a great option.
AUTHOR
mst - Matt S. Trout <mst@shadowcat.co.uk>
CONTRIBUTORS
frew - Arthur Axel "fREW" Schmidt <frioux@gmail.com>
COPYRIGHT
Copyright (c) 2010 the Data::Dumper::Concise "AUTHOR" and "CONTRIBUTORS" as listed above.
LICENSE
This library is free software and may be distributed under the same terms as perl itself.
perl v5.18.2 2013-12-31 Data::Dumper::Concise(3)