11-01-2019
Data?
Your indices don't seem to be consistent.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Thought i should start this has a new thread.
i am stuck on the following question, but after learning more unix, i have written an answer to it. Can anyone check to see if it is correct and what improvements need to be made?
Question:
Write a pipeline that updates the content of a file (a... (0 Replies)
Discussion started by: Vn3050
0 Replies
2. Shell Programming and Scripting
Hi ,
I have file :
after i run this command :
there are error
can we print blank line if output error ??
thanks.. ^^ (4 Replies)
Discussion started by: justbow
4 Replies
3. Shell Programming and Scripting
Hi,
I'm executing unixbench tool v4.1 on an embedded system and I'm getting these error messages:
Execl Throughput 1 2 3awk: /unixbench/unixbench-4.1.0/pgms/loops.awk:38: (FILENAME=- FNR=4) fatal: division by zero attempted
Pipe Throughput 1 2 3 4 5 6 7 8 9 10awk:... (3 Replies)
Discussion started by: rogelio
3 Replies
4. Shell Programming and Scripting
Hello,
I am searching for a way to calculate for example 10/100 within a shellscript and the result should be 0.1 and not just 0.
Every alternative i tried just results 0
Thank you in advance
2retti (6 Replies)
Discussion started by: 2retti
6 Replies
5. UNIX for Dummies Questions & Answers
hi,
The below commands result only the whole number(not giving the decimal values).
pandeeswaran@ubuntu:~$ echo 1,2,3,4|sed 's/,/\//g'|bc
0
pandeeswaran@ubuntu:~$ echo 1000,2,3|sed 's/,/\//g'|bc
166
How to make it to return the decimal values?
Thanks (5 Replies)
Discussion started by: pandeesh
5 Replies
6. Shell Programming and Scripting
when i try the snippet in the console its working fine:
ps awwwux | grep php-fpm | grep -v grep | grep -v master | awk '{total_mem = $6 * 1024 + total_mem; total_proc++} END{printf("%d\n", total_mem / total_proc)}'
output:
but when i try the bash script:
#!/bin/sh
# -*- sh -*-
#... (3 Replies)
Discussion started by: danieloooo
3 Replies
7. Shell Programming and Scripting
Hi Friends,
My input
chr1 100 200 1234E-02 0.01 0.05 10
chr1 100 200 14E-11 0.11 0.50 1
chr1 100 200 134E-22 0.00 0.65 111
My command
awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$13}' input | awk '{v=($5/$6); print $0"\t"v}' OFS="\t" | awk '{$8=(log($8)/log(2)); print $0}'... (4 Replies)
Discussion started by: jacobs.smith
4 Replies
8. Shell Programming and Scripting
I want to implement the below formula with awk oneliner
new_value = ((old_value - old_min) / (old_max - old_min) ) * (new_max - new_min) + new_min
I want to pass the value of old_min and old_min as variable. Here is what I did for this
old_min=$(awk 'BEGIN{a=100000000000}{if ($10<0+a) a=$10}... (2 Replies)
Discussion started by: sammy777888
2 Replies
9. What is on Your Mind?
Today, I noticed some errors in our SSL cert renewal log files, mostly related to domains where the IP address had changed. Concerned about this, rebuilt out SSL cert, which normally goes well without a hiccup.
However, for today, for some reason which I cannot explain, there was a PHP error... (0 Replies)
Discussion started by: Neo
0 Replies
LEARN ABOUT REDHAT
data::grove
Data::Grove(3) User Contributed Perl Documentation Data::Grove(3)
NAME
Data::Grove -- support for deeply nested structures
SYNOPSIS
use Data::Grove;
$object = MyPackage->new;
package MyPackage;
@ISA = qw{Data::Grove};
DESCRIPTION
"Data::Grove" provides support for deeply nested tree or graph structures. "Data::Grove" is intended primarily for Perl module authors
writing modules with many types or classes of objects that need to be manipulated and extended in a consistent and flexible way.
"Data::Grove" is best used by creating a core set of ``data'' classes and then incrementally adding functionality to the core data classes
by using ``extension'' modules. One reason for this design is so that the data classes can be swapped out and the extension modules can
work with new data sources. For example, these other data sources could be disk-based, network-based or built on top of a relational data-
base.
Two extension modules that come with "Data::Grove" are "Data::Grove::Parent" and "Data::Grove::Visitor". "Data::Grove::Parent" adds a
`"Parent"' property to grove objects and implements a `"root"' method to grove objects to return the root node of the tree from anywhere in
the tree and a `"rootpath"' method to return a list of nodes between the root node and ``this'' node. "Data::Grove::Visitor" adds callback
methods `"accept"' and `"accept_name"' that call your handler or receiver module back by object type name or the object's name.
"Data::Grove" objects do not contain parent references, Perl garbage collection will delete them when no longer referenced and sub-struc-
tures can be shared among several structures. "Data::Grove::Parent" is used to create temporary objects with parent pointers.
Properties of data classes are accessed directly using Perl's hash functions (i.e. `"$object->{Property}"'). Extension modules may also
define properties that they support or use, for example Data::Grove::Parent adds `"Parent"' and `"Raw"' properties and Visitor depends on
`"Name"' and `"Content"' properties.
See the module "XML::Grove" for an example implementation of "Data::Grove".
METHODS
new( PROPERTIES )
Return a new object blessed into the SubClass, with the given properties. PROPERTIES may either be a list of key/value pairs, a single
hash containing key/value pairs, or an existing "Data::Grove" object. If an existing "Data::Grove" is passed to `"new()"', a shallow
copy of that object will be returned. A shallow copy means that you are returned a new object, but all of the objects underneath still
refer to the original objects.
AUTHOR
Ken MacLeod, ken@bitsko.slc.ut.us
SEE ALSO
perl(1)
perl v5.8.0 2000-02-22 Data::Grove(3)