mirror of
https://github.com/jarun/nnn.git
synced 2024-11-05 10:53:11 +00:00
16 lines
294 B
Bash
Executable file
16 lines
294 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# Description: View a file in hex
|
|
# Dependencies: hx (https://github.com/krpors/hx)/xxd and $PAGER
|
|
#
|
|
# Shell: POSIX compliant
|
|
# Author: Arun Prakash Jana
|
|
|
|
if [ -n "$1" ]; then
|
|
if which hx >/dev/null 2>&1; then
|
|
hx "$1"
|
|
else
|
|
xxd "$1" | $PAGER
|
|
fi
|
|
fi
|