aboutsummaryrefslogtreecommitdiffstats
path: root/user-scripts/hexview
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-23 07:44:34 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-03-23 07:44:34 +0530
commit144682ad49ea9c95fa935abb14a86de41fb8a95e (patch)
tree7a8ae65ad30d6ca608495a1c09619a30b80cb4b1 /user-scripts/hexview
parent00f18570995c2518b51416b64763611baa9a81e8 (diff)
downloadnnn-144682ad49ea9c95fa935abb14a86de41fb8a95e.tar.gz
Add user script to view files in hex
Diffstat (limited to 'user-scripts/hexview')
-rwxr-xr-xuser-scripts/hexview11
1 files changed, 11 insertions, 0 deletions
diff --git a/user-scripts/hexview b/user-scripts/hexview
new file mode 100755
index 0000000..5125fa3
--- /dev/null
+++ b/user-scripts/hexview
@@ -0,0 +1,11 @@
+#!/usr/bin/env sh
+
+# Description: View a file in hex
+# Requires: xxd and $PAGER
+#
+# Shell: POSIX compliant
+# Author: Arun Prakash Jana
+
+if ! [ -z "$1" ]; then
+ xxd "$1" | "$PAGER"
+fi