W3cubDocs

/Nushell

decode hex for formats

Hex decode a value.

Signature

> decode hex {flags} ...rest

Parameters

  • ...rest: For a data structure input, decode data at the given cell paths

Input/output types:

input output
list<string> list<binary>
record record
string binary
table table

Examples

Hex decode a value and output as binary

>'0102030A0a0B'|decode hex
Length:6 (0x6) bytes|printablewhitespaceascii_othernon_ascii
00000000:0102030a0a0b•••__•

Whitespaces are allowed to be between hex digits

>'01 02  03 0A 0a 0B'|decode hex
Length:6 (0x6) bytes|printablewhitespaceascii_othernon_ascii
00000000:0102030a0a0b•••__•

Tips: Command decode hex was not included in the official binaries by default, you have to build it with --features=extra flag

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/decode_hex.html