hello all
im trying to use in sun Solaris the information received from the top command
now i several machines that dont have install the top program so when im running the script im geting error
saying after im running this code :
set MemoryInfo = `top | grep Memory`
if (... (2 Replies)
I want the output of the find command to be printed and also the total files found by it. Can someone help in this.
Obviously $ find . -type f | wc -l will not output the files found but only the count. I want both. There can be millions and trillions of files so dont want the output of find... (3 Replies)
Hi all this is a UNIX question.
I have a large flat file with millions of records.
col1|col2|col3
1|a|b
2|c|d
3|e|f
3|g|h
footer****
I am supposed to calculate the sum of col1 1+2+3+3=9, count of col1 1,2,3,3=4, and distinct count of col1 1,2,3=c3
I would like it if you avoid... (4 Replies)
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Hi All,
I need to get the count of records in the file, if the passing parameter matches with the list of records in the file. Below is my example
source file: Test1.dat
20120913
20120913
20120912
20120912
20120912
20120912
20120912
20120913
20120913
20120912
In my script I am... (5 Replies)
Hello All,
I got a requirement when I was working with a file. Say the file has unloads of data from a table in the form
1|121|asda|434|thesi|2012|05|24|
1|343|unit|09|best|2012|11|5|
I was put into a scenario where I need the field count in all the lines in that file. It was simply... (6 Replies)
Hi guys,
I'm struggling with this one, any help is appreciated.
I have File1 with hundreds of unique words, like this:
word1
word2
word3
I want to count each word from file1 in file2 and return how many times each word is found.
I tried something like this:
for i in $(cat file1); do... (13 Replies)
What I'm trying to accomplish. I receive a Header and Detail file for daily processing. The detail file comes first which holds data, the header is a receipt of the detail file and has the detail files record count. Before processing the detail file I would like to put a wrapper around another... (4 Replies)
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
LEARN ABOUT OSX
data::dumper::concise
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.16.2 2011-01-20 Data::Dumper::Concise(3)