Help with Round Up with 2 decimal point at specific column
Input file:
Desired output file:
Command try:
I able to get what I want, but the way I did.
It seems like not so "nice"
Thus just wonder whether how to specific just do 2 decimal point at specific column.
Hi,
I have input with decimal point ( 9.99 ) for hours variable hrs.
I need to change it to seconds.
Here is my code:
secs=`/usr/ucb/echo $hrs*3600 |bc`
But I don't want to see the decimal point.
I can use awk to trim it if there is one.
I am just wondering if there is better standard... (2 Replies)
Hi all. Using /bin/sh on an HPUX system.
I want to place a decimal in the field 2 charactors from the right (yes, converting to currency). The field lengths are variable. Here's what I'm doing:
exec < filename
while read FIELD1 FIELD2
do
FIELD1="echo $FIELD1 | sed 'syntax that will... (4 Replies)
Hi
In Unix, I have a file with some numbers like :
45600
12345
I want to insert a decimal point for these numbers based on user input.
If the input is 2, the numbers should be changed to
456.00
123.45
If the input is 3, the numbers should be changed to
45.600
12.345
Can... (2 Replies)
i have a file in which 3 values are stored like --4.72 4.42 3.86
what i wanna do is that take read each value and compare with a fixed value say 5 but cant do so as i am getting an error for the same.
please check the code
cat /home/nsadm/auto/Logging/uptime.txt| while read a b c
do
if... (2 Replies)
Please help me in rounding up value upto 2 decimal palces using sed command
#!/usr/bin/bash
a=15.42
b=13.33
c=`echo $a*$b |bc -l`
echo $c
above code is is giving output "205.5486" but i want the output as "205.55"
Thank you... (15 Replies)
Hi,
I have an issue converting decimal places of a particular column, i am using below script to get the output, but the output is not generating in desired format.
awk -F"," 'BEGIN{OFS=","}{if(NR==0)getline;if ($7 != "") {if ($7 > 0) $7=$7/100 ; {printf "%.2f"... (3 Replies)
Hi All,
Please help for the following scenario where I want to add a delimiter after 2 decimal point integer.
Original Line
1007937820§L§2016-12-19§000000002§2018-02-01§2050-12-01§00395§M§146713.57§00005.05000§762.59§00395§M§301223.0528§1165§2017-03-31 20:34:25
Expected Line... (12 Replies)
Hi,
I want to round of decimal numbers in comma seperated lines till 2 decimal numbers.
line will be like.
... (4 Replies)
Discussion started by: vishal0746
4 Replies
LEARN ABOUT DEBIAN
gp2c
GP2C(1) PARI GP2C(1)NAME
GP2C - The GP to C compiler
DESCRIPTION
gp2c [-ghfltvydWSTGV] [-i N] [-o <file>] [-p <prefix>] [file.gp]
gp2c is a program that translate GP code to C code that use the libpari library. It tries to generate code looking like the PARI source
code.
user option:
-o <file> : Place output in file <file>.
-g : Generate automatic garbage collection code.
-iN: Set indentation level to N spaces (default 2).
-W : Output information about global variables.
-p <prefix>: Prefix user-defined symbol by <prefix> to avoid conflict.
-s <suffix>: Add suffix <suffix> to GP install names of functions.
-S: Assume strict declarations for functions.
query options:
-h : This help.
-f : Dump information about functions to stderr.
-l : Output the list of functions known to the compiler.
-t : Output the table of types known to the compiler.
-v : Output version information and exit.
debugging options:
-d : Increase debugging level.
-y : Switch parser to debug mode.
-T : Output syntactic tree in treetool format.
-TT : Output syntactic tree in VCG/GRL format.
-G : Generate GP code in place of C code. Don't smile.
-V : Do not clean up variables.
file.gp: file to be processed, default to stdin. The generated C code is output to stdout unless option -o is used.
See the script gp2c-run for an automated compilation process.
COPYING
Copyright 2000-2005 The PARI Group
GP2C is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under
certain conditions. There is absolutely no warranty for GP2C.
AUTHOR
Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
SEE ALSO gp2c-run(1), gp2c-dbg(1), gp(1), gcc(1)GP to C compiler January 2005 GP2C(1)