Skip to content

Latest commit

 

History

History
84 lines (64 loc) · 2.47 KB

File metadata and controls

84 lines (64 loc) · 2.47 KB
title bytes remove
categories bytes
version 0.107.0
bytes Remove bytes.
usage Remove bytes.
editLink false
contributors false

bytes remove for bytes

Remove bytes.

Signature

> bytes remove {flags} (pattern) ...rest

Flags

  • --end, -e: remove from end of binary
  • --all, -a: remove occurrences of finding binary

Parameters

  • pattern: The pattern to find.
  • ...rest: For a data structure input, remove bytes from data at the given cell paths.

Input/output types:

input output
binary binary
table table
record record

Examples

Remove contents

> 0x[10 AA FF AA FF] | bytes remove 0x[10 AA]
Length: 3 (0x3) bytes | printable whitespace ascii_other non_ascii
00000000:   ff aa ff                                             ×××

Remove all occurrences of find binary in record field

> { data: 0x[10 AA 10 BB 10] } | bytes remove --all 0x[10] data
╭──────┬────────────╮
│ data │ [170, 187] │
╰──────┴────────────╯

Remove occurrences of find binary from end

> 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[10]
Length: 6 (0x6) bytes | printable whitespace ascii_other non_ascii
00000000:   10 aa 10 bb  cc aa                                   •ו×××

Remove find binary from end not found

> 0x[10 AA 10 BB CC AA 10] | bytes remove --end 0x[11]
Length: 7 (0x7) bytes | printable whitespace ascii_other non_ascii
00000000:   10 aa 10 bb  cc aa 10                                •ו××ו

Remove all occurrences of find binary in table

> [[ColA ColB ColC]; [0x[11 12 13] 0x[14 15 16] 0x[17 18 19]]] | bytes remove 0x[11] ColA ColC
╭───┬──────────┬──────────────┬──────────────╮
│ # │   ColA   │     ColB     │     ColC     │
├───┼──────────┼──────────────┼──────────────┤
│ 0 │ [18, 19] │ [20, 21, 22] │ [23, 24, 25] │
╰───┴──────────┴──────────────┴──────────────╯