Hi MadeInGermany...
The problem is it rounds both down and up; and int() function rounds down only...
EDIT:
Apologies; ignore, I misread the OP's requirements...
Last edited by wisecracker; 04-22-2020 at 02:01 PM..
Reason: see EDIT:
i want to convert from an integer to a string..in unix...i am writing a C program with embedded SQL...
I remeber using itoa...but for some reason it doesnt work......i cant find it in the manual.....
Maybe that is the wrong command.....
but i have checked Dev Studio.....and it doest exist in the... (6 Replies)
Hi,
I am trying to write a script to extract multiple sets of data from a chemistry output file. The problem section is in the following format...
Geometry "geometry" -> "geometry"
1 Pd 46.0000 -0.19290971 0.00535260 0.02297606
2 P ... (7 Replies)
Hiii
I actually intent to check the integer or floating point number input by user i.e. 23, 100, 55.25, 12.50 ..etc. However, when someone input strings or alpha character, my program has to show invalid input.!! Is there any Unix shell script syntax can help me to check ?
Thanking you (2 Replies)
Hi !
I'm looking for a way to transform certain floating point numbers in a one-line, variable length file to integers.
I can do this in a crude way with sed :
sed -e 's/0\.\(\):/\1:/g' -e 's/0\.0\(\):/\1:/g' -e 's/1\.000:/100:/g' myfile ... but this doesn't handle the rounding correctly.
... (3 Replies)
Hi !
How to increment a varibale in ksh.
#!/bin/ksh
set -x
RELEASE_NUM=5.2.103
VAL=0.0.1
RELEASE_NUM=`echo $RELEASE_NUM + $VAL | bc`
echo $RELEASE_NUM
The above code is throwing this error.
+ RELEASE_NUM=5.2.103 (2 Replies)
Hi fellows!!
i'm doing something which is not working out for me properly which i don't understand why
nowdate=`date +%s`
echo $nowdate
now the problem how to convert a date which is stored in a variable
mydate="22/Oct/2011"
mydate=`date -d '$mydate' +%s`
it gives error... (11 Replies)
I am running some commands and I am trying to get an output into a variable. I am having problem when I try to put that value in while loop, it says integer value expected. What's the best way to accomplish this
remaining=$(symclone -sid XXX -f Clone_test query | grep MB | awk '{print... (1 Reply)
Using below command
awk 'NR==FNR{A=$1;next}
{sum+=($2*A)}END{OFMT="%20f";print int(sum)}' Market.txt Product.txt
answer:351770174.00000
how to convert this to 351770174.
when i try with below command i am getting different result.
awk 'NR==FNR{A=$1;next}... (3 Replies)
I have a document that has 7 columns.
eg.
$1 $2 $3 $4 $5 $6 $7
string string string string integer integer integer
The 6th and 7th columns are a mix of integers and floating decimals (with 4 decimal places). I need to convert the last 2 columns so that all... (3 Replies)
Hello Guys,
I have a floating point number 1.14475E+15 I want to convert this number in to full number (Integer or Big integer). I tried couple of functions it did not work. When I use INT=${FLOAT/.*} I am getting value as 1. I don't want a truncated value
#!/bin/bash
#... (9 Replies)
Discussion started by: skatpally
9 Replies
LEARN ABOUT LINUX
orber_acl
orber_acl(3erl) Erlang Module Definition orber_acl(3erl)NAME
orber_acl - Orber ACL operations
DESCRIPTION
This module contains functions intended for analyzing Access Control List (ACL) filters. The filters uses a extended format of Classless
Inter Domain Routing (CIDR). For example, "123.123.123.10" limits the connection to that particular host, while "123.123.123.10/17" allows
connections to or from any host equal to the 17 most significant bits. Orber also allow the user to specify a certain port or port range,
for example, "123.123.123.10/17#4001" and "123.123.123.10/17#4001/5001" respectively. IPv4 or none compressed IPv6 strings are accepted.
EXPORTS
match(IP, Direction) -> boolean()
match(IP, Direction, GetInfo) -> Reply
Types IP = tuple() | [integer()]
Direction = tcp_in | ssl_in | tcp_out | ssl_out
GetInfo = boolean()
Reply = boolean() | {boolean(), [Interface], PortInfo}
Interface = string()
PortInfo = integer() | {integer(), integer()}
If GetInfo is not supplied or set to false, this operation returns a boolean which tells if the IPv4 or IPv6 address would pass the
ACL filter, defined by the iiop_acl configuration parameter, or not. When GetInfo is set to true, a tuple which, besides the boolean
that tells if access was granted, also include the defined interfaces and port(s). This operation requires that Orber is running and
can be used on a live node to determine if Orber has been properly configured.
verify(IP, Filter, Family) -> Reply
Types IP = string()
Filter = string()
Family = inet | inet6
Reply = true | {false, From, To} | {error, string()}
From = string()
To = string()
This operation returns true if the IPv4 or IPv6 address would pass the supplied ACL. If that is not the case, a tuple containing the
accepted range is returned. This operation should only be used for test purposes.
range(Filter, Family) -> Reply
Types Filter = string()
Family = inet | inet6
Reply = {ok, From, To} | {error, string()}
From = string()
To = string()
Returns the range of accepted IP addresses based on the supplied filter. This operation should only be used for test purposes.
Ericsson AB orber 3.6.20 orber_acl(3erl)