07-22-2009
Yes, thats right. It does display 5 decimal places after, but for some reason, it replaces it with zeros.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello !
Does anyone knows how can I convert hexadecimal to decimal base in the ksh or csh script ??
Thanks !
Witt (1 Reply)
Discussion started by: witt
1 Replies
2. Shell Programming and Scripting
Please Help Me! about the problem down under.
I have 2 files with nearly the same characteristics, I have to convert one to the other format or the other format to one's format. I want to write it with awk.
The first file contain lines like this:
300000001#A#Y#Y#Y#Y
The other file contain... (4 Replies)
Discussion started by: Axel82
4 Replies
3. Shell Programming and Scripting
I am trying to read values from excel and perform some calculations but I am getting below error:
expr 2.326227180240883E7 / 8.509366417956961E8
expr: non-numeric argument
Can anyone let me know how do i convert thse exponential numbers to decimal. (2 Replies)
Discussion started by: sachinnayyar
2 Replies
4. Shell Programming and Scripting
can someone help me in converting hex streams to decimal values using perl script
Hex value:
$my_hex_stream="0c07ac14001676";
Every hex value in the above stream should be converted in to decimal and separated by comma.
The output should be: 12,07,172,20,00,22,118 (2 Replies)
Discussion started by: Arun_Linux
2 Replies
5. Shell Programming and Scripting
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)
Discussion started by: katakamvivek
3 Replies
6. Shell Programming and Scripting
hi all,
this is my script:
#! /bin/sh
minutes=$( { i2cget -f -y 0 0x51 3; } 2>&1 )
minutes=${minutes:2}
hour=$( { i2cget -f -y 0 0x51 4; } 2>&1 )
hour=${hour:2}
day=$( { i2cget -f -y 0 0x51 5; } 2>&1 )
day=${day:2}
month=$( { i2cget -f -y 0 0x51 7; } 2>&1 )
month=${month:2}
... (6 Replies)
Discussion started by: enaud
6 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I want to convert two hexadecimal numbers to decimal using unix command line.
1cce446295197a9d6352f9f223a9b698
fc8f99ac06e88c4faf669cf366f60d
I tried using
`echo "ibase=16; $no |bc`
printf '%x\n' "1cce446295197a9d6352f9f223a9b698"
but it doesn't work for such big number it... (4 Replies)
Discussion started by: sudhakar T
4 Replies
8. Programming
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Discussion started by: greenworld123
1 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
cat filename | awk '{print $1, $2, $4, $5, $6, $7, $8, $9, $10;}' | awk 'NF > 0'
OUTPUT:
2015-01-19 00:12:32 00000000fbfa0000 000000009ae5cf80 014d 015d 0017 003c 0362de20
2015-01-19 00:13:52 00000000fc820000 00000000994c6758 014c 015d 000b 003c 08670250
2015-01-19 00:14:25... (12 Replies)
Discussion started by: sam@sam
12 Replies
10. UNIX for Advanced & Expert Users
Hi , I have a file which contains text like
A|Mau|Code|12|Detail
B|Mau|Code|20|Header
I want to write a command using awk which will output
A|Mau|Code|12.00|Detail
B|Mau|Code|20.00|Header
I used a command like awk -F"|" {printf "%s|%s|%s|%.2f|%s",$1,$2,$3,$4,$5}' which does the... (4 Replies)
Discussion started by: LoneRanger
4 Replies
LEARN ABOUT DEBIAN
tpm_nvread
tpm_nvread(8) tpm_nvread(8)
NAME
tpm_nvread
SYNOPSIS
tpm_nvread [OPTIONS]
DESCRIPTION
tpm_nvread reads data from an NVRAM area and either displays them or writes them into a file. The user must provide the index of the NVRAM
area. If the user provided the number of bytes to read then this will be the maximum number of bytes that will be read from the NVRAM area,
otherwise the whole NVRAM area will be read. Some NVRAM areas only allow read sizes of zero, i.e., NVRAM area with index 0. Optionally an
offset into the NVRAM area can be given where the reading of the data is to start. If the NVRAM area has permission bits set that require
owner or NVRAM area authentication, then the password must be provided via the password option.
The following options are supported:
-h, --help
Display command usage info.
-v, --version
Display command version info.
-l, --log [none|error|info|debug]
Set logging level.
-u, --unicode
Use TSS UNICODE encoding for passwords to comply with applications using TSS popup boxes
-z, --well-known
Use a secret of all zeros (20 bytes of zeros) as either the NVRAM area or owner secret.
-p, --password
Depending on what type of authentication is required for the NVRAM area, this must either be the NVRAM area or owner password.
A password may be directly provided for example by using '--password=password' or '-ppassword'. If no password is provided then the
program will prompt the user for the password.
-i, --index
The index of the NVRAM area. The parameter may either be a decimal number or a hexadecimal number starting with '0x'.
-s, --size
The number of bytes to read from the NVRAM area. The parameter may either be a decimal number or a hexadecimal number starting with
'0x'.
-n, --offset (optional parameter)
The offset into the NVRAM area from where to start reading. The parameter may either be a decimal number or a hexadecimal number
starting with '0x'.
-f, --filename (optional parameter)
The name of a file the read data will be written into. If no filename is given the data will be printed to stdout.
SEE ALSO
tpm_nvdefine(8), tpm_nvinfo(8), tpm_nvrelease(8), tpm_nvwrite(8)
REPORTING BUGS
Report bugs to <trousers-users@lists.sourceforge.net>
TPM Management 2011-07-11 tpm_nvread(8)