-
Notifications
You must be signed in to change notification settings - Fork 2.1k
into binary behavior is surprising #3414
Copy link
Copy link
Closed
Description
Describe the bug
I wanted to dump the first bytes of a PNG file using cat myimage.png | into binary -b 100 but got a table instead of a binary view.
To Reproduce
Steps to reproduce the behavior:
cat myimage.png | into binary -b 100
Expected behavior
I expected an output like this:
Length: 140 (0x8c) bytes | printable whitespace ascii_other non_ascii
00000000: ef bf bd 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 ×××PNG__•_000_IH
00000010: 44 52 00 00 07 76 00 00 04 18 08 06 00 00 00 ef DR00•v00••••000×
00000020: bf bd 2d 38 ef bf bd 00 00 00 09 70 48 59 73 00 ××-8×××000_pHYs0
00000030: 00 0e ef bf bd 00 00 0e ef bf bd 01 ef bf bd 2b 0•×××00•××ו×××+
00000040: 0e 1b 00 00 20 00 49 44 41 54 78 ef bf bd ef bf ••00 0IDATx×××××
00000050: bd ef bf bd 79 7c 14 ef bf bd ef bf bd ef bf bd ××××y|•×××××××××
00000060: ef bf bd ef bf bd 77 76 73 10 6e 0f 50 7b ef bf ××××××wvs•n•P{××
00000070: bd 55 10 ef bf bd 79 ef bf bd 1c 49 ef bf bd 20 ×U•×××y××וI×××
00000080: ef bf bd 72 58 2b 1a ef bf bd d5 aa ×××rX+•×××××
(I got this output using cat img.png | into binary -b 100 | nth 0 as suggested on Discord)
Configuration (please complete the following information):
Run version | pivot and paste the output to show OS, features, etc.
| Column0 | Column1 |
|---|---|
| version | 0.31.0 |
| short_commit | b93b80c |
| commit_hash | b93b80c |
| commit_date | 2021-05-11 07:59:24 |
| build_os | linux-x86_64 |
| rust_version | rustc 1.52.1 (9bc8c42bb 2021-05-09) |
| rust_channel | stable-x86_64-unknown-linux-gnu (default) |
| cargo_version | cargo 1.52.0 (69767412a 2021-04-21) |
| pkg_version | 0.31.0 |
| build_time | 2021-05-11 10:07:34 |
| build_rust_channel | release |
| features | clipboard-cli, ctrlc, default, directories, dirs, ptree, rustyline, term, trash, uuid, which, zip |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels