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
rdmsr
rdmsr(1) General Commands Manual rdmsr(1)NAME
rdmsr - tool for reading CPU machine specific registers (MSR)
SYNOPSIS
rdmsr [options] regno
DESCRIPTION
rdmsr is a tool used for reading a CPU's machine specific registers (MSR).
OPTIONS --help, -h
Print a list of available options
--version, -V
Print current version
--hexadecimal, -x
Display output in hexadecimal (lower case)
--capital-hex, -X
Display output in hexadecimal (upper case)
--decimal, -d
Display output in signed decimal
--unsigned, -u
Display output in unsigned decimal
--octal, -o
Display output in octal
--c-language, -c
Format output as a C language constant
--zero-pad, -0
Output leading zeroes
--zero-pad, -0
Output leading zeroes
--raw, -r
Output raw binary
--processor <#>, -p
Select processor number (default: 0)
--bitfield h:l, -f
Output bits [h:l] only
SEE ALSO wrmsr(1)AUTHOR
rdmsr was written by Transmeta Corporation
This man page was contributed by Andres Salomon <dilinger@debian.org> for the Debian GNU/Linux system (but may be used by others).
Mar 2008 rdmsr(1)