Sponsored Content
Full Discussion: Round floor behavior
Top Forums Programming Round floor behavior Post 303016020 by anijan on Wednesday 18th of April 2018 08:33:51 AM
Old 04-18-2018
@Don Cragun..
You were right.!

the math.h was not visible which was causing conversion issues.

It works fine now.

Thanks.!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to round a value

Hello, In a unix shell script,i want to round a variabele to a nearest number Ex: set count=104.4 How can i round that to 105.? Thanks, Sateesh (2 Replies)
Discussion started by: kotasateesh
2 Replies

2. Shell Programming and Scripting

round in KSH

Is there an easy way to round a number up in Korn shell? ie. 10.4 --> 11 Thanks. (6 Replies)
Discussion started by: here2learn
6 Replies

3. Shell Programming and Scripting

round a number

In a shell script - How do I round a decimal number (contained in a variable) to the nearest whole number? (2 Replies)
Discussion started by: achieve
2 Replies

4. Shell Programming and Scripting

FLOOR Func

Hello Experts, Is there any inbuild FLOOR function to do FLOOR func in mathmetics in awk script like in FlOOR Func in C. Ex:- floor(2.9) = 2 floor(2.1) = 2 floor(2.0) = 2 floor(-2.0) = 2 floor(-2.1) = -3 floor(-2.9) =... (1 Reply)
Discussion started by: user_prady
1 Replies

5. Shell Programming and Scripting

Round the column value :

Hi .... Iam having the file ....in which 3rd column is numerical having 8 decimal part... i want that to cut to 2 decimal part ... Source File : E100|0|19940.10104030|0|1ABC E103|1|19942.10195849|3|0ABC E100|0|19943.10284858|0|1ABC I want to be ...... Reulst: ... (4 Replies)
Discussion started by: satyam_sat
4 Replies

6. Shell Programming and Scripting

Round with awk

Hi, I have a problem. Basically I dont know how to use awk. I have a script (below) which works fine. What I want to do is somehow "pipe" in the input say 4.5 and have it give the anwer, I dont want ot have to type it in, since it will be running in a script. Any ideas how to do this???? ... (1 Reply)
Discussion started by: AnnaLynn
1 Replies

7. Shell Programming and Scripting

Round off the a Decimal value.

HI, I have a script which is used to calculate the Memory & CPU utilization a server. memx=`ssh -l siebel1 ${f} /usr/sbin/prtconf|grep -i 'Memory size'|tr -s " "|/usr/xpg4/bin/awk -F" " '{print $3 * 1024}'` v5=`ssh -l siebel1 ${f} vmstat 1 2 | tail -1 | tr -s " " | /usr/xpg4/bin/awk -v... (3 Replies)
Discussion started by: dear_abhi2007
3 Replies

8. Shell Programming and Scripting

How to round up on fives in unix?

i'm a newbie here, i need help with a shell script. for a given number, if it is greater than ten round to the nearest 10 same for 100, if it is greater than 100 round to the nearest 100, and same for 1000. i'm confused how to start this... its supposed to look like this input ... (11 Replies)
Discussion started by: CRAZYLITTLELOU
11 Replies

9. Shell Programming and Scripting

CEILING and FLOOR functions

Hi all, Does anyone know how to simulate a ceiling or floor function in UNIX? OS is Solaris. I tried the suggestion from an old forum but it is giving me error as below: server01/tmp$: echo "7.2" | awk '{printf("%d\n",$0+=$0<0?0:0.999)}' awk: syntax error near line 1 awk: illegal... (3 Replies)
Discussion started by: newbie_01
3 Replies

10. Shell Programming and Scripting

Round up the decimals

Hi All, I would like to do the following in the shell script 561.76 to 562 I tried using this echo 'scale=0; 749 * 75 /100 ' | bc but just returned only 561 Please help me . I appreciate your help Thanks rajeevm (13 Replies)
Discussion started by: rajeevm
13 Replies
GXL2GV,GV2GXL(1)					      General Commands Manual						  GXL2GV,GV2GXL(1)

NAME
gxl2gv,gv2gxl - GXL-GV converters SYNOPSIS
gxl2gv [ -gd? ] [ -ooutfile ] [ files ] gv2gxl [ -gd? ] [ -ooutfile ] [ files ] DESCRIPTION
gxl2gv converts between graphs represented in GXL and in the GV language. Unless a conversion type is specified using a flag, gxl2gv will deduce the type of conversion from the suffix of the input file, a ".gv" suffix causing a conversion from GV to GXL, and a ".gxl" suffix causing a conversion from GXL to GV. If no suffix is available, e.g. when the input is from a pipe, and no flags are used then gxl2gv assumes the type of the input file from its executable name so that gxl2gv converts from GXL to GV, and gv2gxl converts from GV to GXL. GXL supports a much richer graph model than GV. gxl2gv will attempt to map GXL constructs into the analogous GV construct when this is pos- sible. If not, the GXL information is stored as an attribute. The intention is that applying gxl2gv|gv2gxl is semantically equivalent to the identity operator. OPTIONS
The following options are supported: -g The command name and input file extensions are ignored, the input is taken as a GV file and a GXL file is generated. -d The command name and input file extensions are ignored, the input is taken as a GXL file and a GV file is generated. -? Prints usage information and exits. -o outfile If specified, the output will be written into the file outfile. Otherwise, output is written to standard out. OPERANDS
The following operand is supported: files Names of files containing 1 or more graphs in GXL or GV. If no files operand is specified, the standard input will be used. RETURN CODES
Both gxl2gv and gv2gxl return 0 if there were no problems during conversion; and non-zero if any error occurred. BUGS
gxl2gv will only convert in one direction even if given multiple files with varying suffixes. The conversion can only handle one graph per GXL file. There are some GXL constructs which gxl2gv cannot handle. AUTHORS
Krishnam Pericherla <kp@research.att.com> Emden R. Gansner <erg@research.att.com> SEE ALSO
dot(1), libgraph(3), libagraph(3), neato(1), twopi(1) 20 December 2002 GXL2GV,GV2GXL(1)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy