Quantcast
Channel: Decimal to Hexadecimal conversion working in Linux but not in Unix - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 2

Decimal to Hexadecimal conversion working in Linux but not in Unix

$
0
0

I want to convert a decimal number to hexadecimal number. I used the command :

printf '%X\n' 053698180

This command is working perfectly fine on Linux server. But throwing the below error when tried on UNIX :

printf: Error converting 053698180
053698180

What could be the issue here?

Also, what is the least possible correction that can be made here so as to make it work on UNIX and Linux both?


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>