Conversion hexadécimal - décimal
This commit is contained in:
parent
3c69ff7c2c
commit
977b565457
25
TipsShell.md
25
TipsShell.md
|
@ -750,3 +750,28 @@ Pour générer un mot de passe hexadecimal de 6 octets :
|
|||
```
|
||||
openssl rand -hex 6
|
||||
```
|
||||
|
||||
# Autres
|
||||
|
||||
## Hexadécimal - décimal
|
||||
|
||||
```
|
||||
$ printf '%x\n' 27
|
||||
1b
|
||||
$ printf '%d\n' 0x1b
|
||||
27
|
||||
```
|
||||
|
||||
```
|
||||
$ bc
|
||||
> obase=16
|
||||
> 27
|
||||
1B
|
||||
```
|
||||
|
||||
```
|
||||
$ bc
|
||||
> ibase=16
|
||||
> 1B
|
||||
27
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue