What I really need help with, is a script that searches for a changable string, if it finds it, we replace the output with the corresponding value/string.
say if I have a datafile with this info(string to search for separated by a , with the output after it):
It would without a hitch with either ; or = or any other sign to separate the two, just so if the first is found, the second is posted.
I have a file with a format of
A,2
B,2
G,3
A,2
A,3
A,2
D,7
A,2
E,2
A,2
I need to create a sum of each alphabet with the numbers assigned to it using awk. (2 Replies)
I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes).
Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash.
Most of the printing seems to be OK but in... (1 Reply)
Hello,
I have a hash in hsh. I need to assign it to another hash globalHsh. I think the below statement does not work
$globalHsh{$id} = %hsh;
What is the right way to assign it?
Thanks (3 Replies)
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
Hi,
In Perl, is it possible to use a range of numbers with '..' as a key in a hash?
Something in like:
%hash = (
'768..1536' => '1G',
'1537..2560' => '2G'
);
That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Hi,
I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all .
my %result (
$abc => {
'data_count' => '10',
'ID' => 'ABC122',
}
$def => {
'data_count' => '20',
'ID' => 'defASe',
... (1 Reply)
Hi, I am also a newbie in awk and trying to find solution of my problem.
I have one reference file 1.txt with 2 columns and I want to search other 10 files (a.txt, b.txt......h.txt each with 5 columns) corresponding to the values of 2nd column from 1.txt. If the value from 2nd column from 1.txt... (0 Replies)
Hi, I have a hash of hash where it has
name, activities and count
i have data like this -
$result->{$name}->{$activities} = $value;
content of that are -
name - robert tom cat peter
activities - running, eating, sleeping , drinking, work
i need to print output as below
... (3 Replies)
Discussion started by: asak
3 Replies
LEARN ABOUT LINUX
memusagestat
MEMUSAGESTAT(1) Linux programmer's manual MEMUSAGESTAT(1)NAME
memusagestat - generate graphic from memory profiling data
SYNOPSIS
memusagestat [option]... datafile [outfile]
DESCRIPTION
memusagestat creates a PNG file containing a graphical representation of the memory profiling data in the file datafile; that file is gen-
erated via the -d (or --data) option of memusage(1).
The red line in the graph shows the heap usage (allocated memory) and the green line shows the stack usage. The x-scale is either the num-
ber of memory-handling function calls or (if the -t option is specified) time.
OPTIONS -o file, --output=file
Name of the output file.
-s string, --string=string
Use string as the title inside the output graph.
-t, --time
Use time (rather than number of function calls) as the scale for the X axis.
-T, --total
Also draw a graph of total memory consumption.
-x size, --x-size=size
Make the output graph size pixels wide.
-y size, --y-size=size
Make the output graph size pixels high.
-?, --help
Print a help message and exit.
--usage
Print a short usage message and exit.
-V, --version
Print version information and exit.
EXAMPLE
See memusage(1).
BUGS
To report bugs, see <http://www.gnu.org/software/libc/bugs.html>
SEE ALSO memusage(1), mtrace(1)GNU 2014-09-06 MEMUSAGESTAT(1)