Skip to content

Conversation

@andrzej-kaczmarek
Copy link
Contributor

This adds '-x' and '-X' arguments to 'cat' command in filesystem cli. Both switches enable hex dump for file contents as either plain hex dump or hex dump with offset markings.

compat> cat -x blob
F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 C4 B2 25 40 F9 FB 01 74 00 57 E5 5D E8 91 00 81 21
20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 31 01 61 05 78 1D B0 CE DA C1 D6 6A 66 AB 03 78 06
74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF

compat> cat -X blob
0000: F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 4C
0010: B2 25 40 F9 FB 01 74 00 57 E5 5D E8 91 00 81 21 
0020: 20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 13 
0030: 01 61 05 78 1D B0 CE DA C1 D6 6A 66 AB 03 78 06 
0040: 74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF

This adds '-x' and '-X' arguments to 'cat' command in filesystem cli.
Both switches enable hex dump for file contents as either plain hex dump
or hex dump with offset markings.

compat> cat -x blob
F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 C4 B2 25 40 F9 FB 01 74 ...
20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 31 01 61 05 78 1D B0 CE ...
74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF

compat> cat -X blob
0000: F9 FB 10 10 20 C6 34 F6 46 56 36 F6 57 07 02 4C
0010: B2 25 40 F9 FB 01 74 00 57 E5 5D E8 91 00 81 21
0020: 20 11 91 F6 AF 21 B1 3B 02 57 7F 00 00 00 00 13
0030: 01 61 05 78 1D B0 CE DA C1 D6 6A 66 AB 03 78 06
0040: 74 AB 92 B4 75 B7 65 02 17 7D FF FF FF FF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants