How can I convert a file with a lot of hex numbers into the decimal?
Example: file1
0x59999
0x5acdc
0xffeff
I want to start
$ cat file1 | util | cat >file2
$ cat file1 | util | cat >file2
and get file2 with smthsomething like:
1021489
1249230
3458080
(numbersThe numbers in example output are random, as I cantcan't convert sosuch long hex numbers to decdecimal)
UpdUPDATE: perl I solved this with the following Perl command: perl -pe '$_=hex;$_.="\n"'
. Can anybody do it better?
perl -pe '$_=hex;$_.="\n"'
Is there a better solution? The real task is a sorting ofneeding to be able to sort hex numbers.