Hi,
I have a script which takes a value from a file and performs calculations on it. Trouble is that this value is a float not an integer and it errors at the decimal point!
eg. 94.62
I would like to be able to detect the length of the float (in this above case, 5 characters), and simply do a... (2 Replies)
Hi all,
I'm looking to modify a script to check disk space usage.
Here is the code at the moment:
#
# The control file, MONITOR_DISK_SPACE, must be in the format ... Drive:;threshold_percentage
# eg.
# C:;95
# D:;98
# E:;90
#
# For each line in the control file (MONITOR_DISK_SPACE)... (2 Replies)
Good morning,
I'm testing the use of ceilf:
/*Filename: str.c*/
#include <stdio.h>
#include <math.h>
int main (void)
{
float ceilf(float x);
int dev=3, result=0;
float tmp = 3.444f;
printf("Result: %f\n",ceilf(tmp));
return 0;
} (1 Reply)
Hi All,
can some body help me to script the below logic. Basically am facing
problem with float calculation. Also i need this to be done inside a single awk.
I tried lot of tuning but still nothing is getting displayed, nor any errors
param=50
value=19.23
for(i=0;i<4;i++)
{... (2 Replies)
Hi
I'm using awk to manipulate the data in the 6th field of the file xxx_yyy.hrv.
The sample data that is available in this field is given below
220731.7100000000000000
When i tried using this command
cat xxx_yyy.hrv | awk '{printf("%23.16f\n",$6*-1)}'
I get the output as... (4 Replies)
Hello,
I need to format a number..like 12900 should be printed as 12,900
and 1209 as 1,209 and so on. (Just like we do in excel).
Can this be done in awk. any printf options we have?Please suggest me.
Thanks! (8 Replies)
Hi guys,
could someone throw some light on the following behaviour of printf (I'll start with info about the system and the tool/shell/interpreter versions)?:
$ uname -a
Linux linux-86if.site 3.1.0-1.2-desktop #1 SMP PREEMPT Thu Nov 3 14:45:45 UTC 2011 (187dde0) x86_64 x86_64 x86_64... (9 Replies)
Heyas
Trying to calculate the total size of a file by reading its bitrate.
Code snippet:
fs_expected() { #
# Returns the expected filesize in bytes
#
pr_str() {
ff=$(cat $TMP.info)
d="${ff#*bitrate: }"
echo "${d%%,*}" | $AWK '{print $1}' | head -n 1
}
t_BYTERATE=$((... (9 Replies)
Hi,
I have been stuck in this requirement where my file contains the below format.
20150812170500846959990854-25383-8.0.0
"ABC Report" hp96880
"4952"
20150812170501846959990854-25383-8.0.0 End of run
20150812060132846959990854-20495-8.0.0
"XYZ Report" vg76452
"1006962188"... (6 Replies)
Hello !
I'm creating a CGI which allow to display graph from some data.
The datas looks like :
2020-01-13-00-00,384.00,350.00
2020-01-13-06-00,384.00,350.00
2020-01-13-12-00,384.00,350.00
2020-01-13-18-00,384.00,350.00
2020-01-14-00-00,384.00,350.00... (1 Reply)
Discussion started by: Tim2424
1 Replies
LEARN ABOUT DEBIAN
x500::rdn
RDN(3pm) User Contributed Perl Documentation RDN(3pm)NAME
X500::RDN - handle X.500 RDNs (Relative Distinguished Names), parse and format them
SYNOPSIS
use X500::RDN;
my $rdn = new X500::RDN ('c'=>'DE');
my $c = $rdn->getAttributeValue ('c');
DESCRIPTION
This module handles X.500 RDNs (Relative Distinguished Names). This is a supporting module for X500::DN.
Methods
o $object = new X500::RDN ('type'=>'value', 'type'=>'value', ...);
Creates an RDN object from argument pairs, each pair an attribute type and value. With more than one pair as arguments, you will get a
multi-valued RDN.
o $object->isMultivalued();
Returns whether the RDN is multi-valued.
o $object->getAttributeTypes();
Returns the RDN's attribute types, a list of strings.
o $object->getAttributeValue (type);
Returns the RDN attribute's value.
o $object->getRFC2253String();
Returns the RDN as a string formatted according to RFC 2253 syntax.
o $object->getX500String();
Returns the RDN as a string formatted according to X.500 syntax. NOTE: This is a hack, there is no definition for a X.500 string
syntax!?
o $object->getOpenSSLString();
Returns the RDN as a string formatted according to one of openssl's syntaxes. Croaks on multi-valued RDNs.
EXPORT
None.
BUGS AUTHOR
Robert Joop <yaph-070708@timesink.de>
COPYRIGHT
Copyright 2002 Robert Joop. All Rights reserved. This program is free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
SEE ALSO
X500::DN, perl.
perl v5.10.0 2007-07-08 RDN(3pm)