logo

xcd-rgb

colorful hex dump (RGB edition) git clone https://anongit.hacktivis.me/git/xcd-rgb.git

xcd.sh (632B)


  1. #!/bin/sh
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+xcd-rgb@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. WD=$(dirname "$0")
  5. set -x -e
  6. tempfile=$(mktemp)
  7. trap "rm $tempfile" EXIT
  8. ./xcd "${WD}/inputs/all_bytes" > "$tempfile"
  9. cmp -l "${WD}/outputs/all_bytes" "$tempfile"
  10. ./xcd - < "${WD}/inputs/all_bytes" > "$tempfile"
  11. cmp -l "${WD}/outputs/all_bytes" "$tempfile"
  12. ./xcd < "${WD}/inputs/all_bytes" > "$tempfile"
  13. cmp -l "${WD}/outputs/all_bytes" "$tempfile"
  14. ./xcd /dev/null > "$tempfile"
  15. cmp -l "${WD}/outputs/null" "$tempfile"
  16. ./xcd </dev/null > "$tempfile"
  17. cmp -l "${WD}/outputs/null" "$tempfile"