The problem seems not to be in "bc", but in "dc". I executed your command (which seems to be correct IMHO) with the "-c" switch (compile only) to bc and it gave me:
This command list seems to be correct.
When executing this inside dc i got the same erroneous result as you (AIX 5.3 here), but when i changed the output base to "2" i got "10001", which is correct. Also, when i use "8" as output base it gave me the corect result "21". I conclude that "dc" has some systematic error.
Edit: didn't see radoulovs hint - i didn't know that. *blushes*
Hi,
please tell me how to convert hex number to decimal
000000E7
000000000002640D
0000000000025B16
and seconds to minutes, hours, days, months, years
bytes to kbytes, mbytes , gbytes
read the following examples
while read a b
do
printf "%5d %5d\n" "0x$a" "0x$b"
done < "$FILE"... (15 Replies)
Hi I want to incremental add hex decimal number to a particula field in file
eg: addr =123 dept1=0
addr = 345 dept2 =1
addr2 = 124 dept3 =2
.
.
.
.
.
.
addr3 =567 dept15 =f
Is there any command which add... (8 Replies)
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)
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)
I am writing a bash script to do some parsing on a log and I am running into a problem when it comes to converting only certain sections of the file from hex to ascii or hex to decimal.
Data Example:
The hex values after Hardware and SW Version I need to convert from Hex to ASCII and the... (16 Replies)
I have 32 bit value in hex that I want to separate into fields and then convert the fields into decimal values.
Input file has 2 words of 32 bit hex values:
000001ac
ca85210e
Output both words separated into individual bit fields:
ca85210e: f1(31:9), f2(8:0)
f7c392ac: f1(31:14),... (2 Replies)
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)
The file contains code like the below and need to convert each one into a decimal
00 00 00 04 17 03 06 01
So the output should come as
0 0 0 4 23 3 6 1 (24 Replies)
How to convert decimal value to hex and than take 1st digits as variable
sample data
84844294,5,6
51291736,2,3
84844294,5,6
51291736,2,3
i can use {printf "%x,%d\n",$1,$2} but than i want to filter base on 1st hex digit 1st recrd (1 Reply)
Discussion started by: before4
1 Replies
LEARN ABOUT DEBIAN
hxwls
HXWLS(1) HTML-XML-utils HXWLS(1)NAME
hxwls - list links in an HTML file
SYNOPSIS
hxwls [ -l ] [ -t ] [ -r ] [ -h ] [ -b base ] [ file ]
DESCRIPTION
The hxwls command reads an HTML file (standard input by default) and prints out all links it finds. The output is written to stdout.
OPTIONS
The following options are supported:
-l Produce a long listing. Instead of just the URI, hxwls prints three columns: the element name, the value of the REL attribute,
and the target URI.
-t Produce a tuple listing. hxwls prints four columns: the URI of the document itself, the element name, the value of the REL
attribute, and the target URI.
-r Print relative URLs as they are, without converting them to absolute URLs.
-b base Use base as the initial base URL. If there is a <base> element in the document, it will override the -b option.
-h Output as HTML. The output will be listed in the form of <a> elements.
OPERANDS
The following operand is supported:
file The name or the URL of an HTML file. If absent, standard input is read instead.
DIAGNOSTICS
The following exit values are returned:
0 Successful completion.
> 0 An error occurred in the parsing of the HTML file. hxwls will try to correct the error and produce output anyway.
SEE ALSO asc2xml(1), hxnormalize(1), hxnum(1), xml2asc(1)6.x 10 Jul 2011 HXWLS(1)