summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsitkevij <sitkevij@gmail.com>2020-04-20 22:05:18 -0700
committersitkevij <sitkevij@gmail.com>2020-04-20 22:05:18 -0700
commitdcfebef40ffc79192f2fa93dc71c54a4b3e2a083 (patch)
treedcbccca4d2e8faec3b105e347bf5cd6bac16f1cd
parentce8e830bdec4305c7ce03568ab31a3677f0ab92a (diff)
#15 stdin update README to include new feature
-rw-r--r--README.md30
1 files changed, 22 insertions, 8 deletions
diff --git a/README.md b/README.md
index 2c92cbf..b0de9bf 100644
--- a/README.md
+++ b/README.md
@@ -2,16 +2,30 @@
Futuristic take on hexdump.
-`hex` takes a file as input and outputs a hexadecimal colorized view to stdout.
+`hex` accepts a file path as input and outputs a hexadecimal colorized view to stdout.
```
-$ hx -c12 tests/files/alphanumeric.txt
-0x000000: 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a 0x6b 0x69 abcdefghijki
-0x00000c: 0x6c 0x6d 0x6e 0x6f 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 lmnopqrstuvw
-0x000018: 0x78 0x79 0x7a 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 xyz012345678
-0x000024: 0x39 0x0a 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 9.0123456789
-0x000030: 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 012345678901
-0x00003c: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 23456789
+$ hx tests/files/alphanumeric.txt
+0x000000: 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a abcdefghij
+0x00000a: 0x6b 0x69 0x6c 0x6d 0x6e 0x6f 0x70 0x71 0x72 0x73 kilmnopqrs
+0x000014: 0x74 0x75 0x76 0x77 0x78 0x79 0x7a 0x30 0x31 0x32 tuvwxyz012
+0x00001e: 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x0a 0x30 0x31 3456789.01
+0x000028: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
+0x000032: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
+0x00003c: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 23456789
+ bytes: 68
+```
+
+`hex` also accepts stdin as input.
+```
+cat "tests/files/alphanumeric.txt" | hx
+0x000000: 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6a abcdefghij
+0x00000a: 0x6b 0x69 0x6c 0x6d 0x6e 0x6f 0x70 0x71 0x72 0x73 kilmnopqrs
+0x000014: 0x74 0x75 0x76 0x77 0x78 0x79 0x7a 0x30 0x31 0x32 tuvwxyz012
+0x00001e: 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x0a 0x30 0x31 3456789.01
+0x000028: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
+0x000032: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x30 0x31 2345678901
+0x00003c: 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 23456789
bytes: 68
```