Bash implements bitrate conversion between hexadecimal and hexadecimal.
Source: Internet
Author: User
Bash implements the 10-in-and 16-in conversion between each other in the linux bash to directly implement the 10-in-, 16-in-, and 2-in conversion: 1. echo & amp; #39; obase10; 10 & amp; #39; | bc10echo & amp; #39; obase2; 10 & amp; #39; | bc10102.echo & quot; 10 & quot; | aw bash converts hexadecimal, hexadecimal, and so on to bash in linux to directly perform hexadecimal and hexadecimal, conversion between binary: 1. echo 'obase = 10; 10' | bc10echo 'obase = 2; 10' | bc1010 2. echo "10" | awk '{printf "% x \ n", $0}' or printf "% x \ n" 10 binary output is not supported, you need to convert the % d decimal signed integer % u decimal unsigned integer % f floating point number % s string % c single character % p pointer value % e exponential floating point number % x, % X unsigned hexadecimal integer % 0 unsigned integer in octal
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.