encode hex
For formats.
Hex encode a binary value or a string.
Command Type
built-in
Signature
> encode hex {flags}
Flags
--lower: Encode to lowercase hex.
Input/output types:
| input | output |
|---|---|
| string | string |
| binary | string |
Examples
Encode a binary value
> 0x[C3 06] | encode hex
C306
Encode a string
> "hello" | encode hex
68656C6C6F
Output a Lowercase version of the encoding
> 0x[AD EF] | encode hex --lower
adef
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.