I'm trying to convert hex to dec and with the help of output i need to do the process. If i execute the below code
i'm getting the error below
but if i change the code as
i get the out put as
[code]
I'm trying to convert hex to dec and with the help of output i need to do the process. If i execute the below code
i'm getting the error below
is there in which if any alphabet is passed its throwing error or i'm wrong in doing it. help me out.
Last edited by joeyg; 05-02-2011 at 12:23 PM..
Reason: Fixed typo in header topic
Dear friends,
I have hexadecimal data like this.
now i want to read each letter and convert to decimal format.
for example.:
from the below data first i have to read hex data 0 and convert to 4 bit decimal value ie 0000.
similarly second letter 8 decimal value is 1000.
like this.... (6 Replies)
I need to have my scripts import volume groups and mknod devices files. I have most of the script working but the device file needs to be in the format 0x??0000 (where the question marks are my HEX representations of the volume group number. I have the code below and the output it produces which... (2 Replies)
Hi Experts,
I have a file called "hex" which contains info like below
How do i convert everything in this file to decimal value? Please advice. Thanks (4 Replies)
Hi All,
I want to convert below Hex value to Dec value in each column .How to do it ? This data is in a 1 file.
4e20 0475
2710 010f
7530 69a2
7530 7e2f
4e20 02dd
7530 6299
4e20 0c0a
7530 69a2
4e20 0a0b
2710 0048
7530 7955
4e20 0d23
7530 622d
7530 9121
2710 001f
7530 7d3f (6 Replies)
Dear All PROs
Thanks in advance
need a shell for Decimal to hex conversion
input file (decimal values)
65,5,48,66,133,131,118,47
65,5,48,66,133,131,83,63
.
.
desire output should be (Hex value)... (11 Replies)
Hello all. I need help...
How can I cenvert this 42ec93df826c804ea531c56594db453d54daad4b to normal text? What convertor I have to use?
Thanks. (12 Replies)
I'm trying to convert hex to dec and with the help of output i need to do the process. If i execute the below code
assetValue=8f
assetNavigation=$(echo "ibase=16; "$assetValue"" | bc)
echo $assetNavigation
i'm getting the error below
$ sh script.sh
(standard_in) 1: syntax error... (2 Replies)
Hi,
Got the below code in this forum,
for i in `cat test`; do
printf "%16s\n" $(echo "ibase=10;obase=16;$i" | bc)
done
Understand, this will not give output with '0'. Need help to get the output with '0'.
Regards,
Siva (2 Replies)
When I try to convert big numbers I get extra numbers at the end that doesn't move plus an L character too. How to remove the 4 extra characters at the end 000L?
8b8dbbc584d9c000L
8b8dc4ddd34c6000L
8b8dcdf621bf0000L
8b8dd70e7031a000L
8b8de026bea44000L
#!/usr/bin/python
... (9 Replies)
Discussion started by: bigvito19
9 Replies
LEARN ABOUT PHP
php_strip_whitespace
PHP_STRIP_WHITESPACE(3) 1 PHP_STRIP_WHITESPACE(3)php_strip_whitespace - Return source with stripped comments and whitespaceSYNOPSIS
string php_strip_whitespace (string $filename)
DESCRIPTION
Returns the PHP source code in $filename with PHP comments and whitespace removed. This may be useful for determining the amount of actual
code in your scripts compared with the amount of comments. This is similar to using php -w from the commandline.
PARAMETERS
o $filename
- Path to the PHP file.
RETURN VALUES
The stripped source code will be returned on success, or an empty string on failure.
Note
This function works as described as of PHP 5.0.1. Before this it would only return an empty string. For more information on this
bug and its prior behavior, see bug report #29606.
EXAMPLES
Example #1
php_strip_whitespace(3) example
<?php
// PHP comment here
/*
* Another PHP comment
*/
echo php_strip_whitespace(__FILE__);
// Newlines are considered whitespace, and are removed too:
do_nothing();
?>
The above example will output:
<?php
echo php_strip_whitespace(__FILE__); do_nothing(); ?>
Notice the PHP comments are gone, as are the whitespace and newline after the first echo statement.
PHP Documentation Group PHP_STRIP_WHITESPACE(3)