Skip to content

Instantly share code, notes, and snippets.

@daschr
Created March 3, 2019 11:41
Show Gist options
  • Save daschr/0b9f8aaa824c452ee4220d58305bfda3 to your computer and use it in GitHub Desktop.
Save daschr/0b9f8aaa824c452ee4220d58305bfda3 to your computer and use it in GitHub Desktop.
#!/bin/bash
# [ "$#" -lt "1" ] && { echo "Usage: $0 [file1] [file2] ..." >&2; exit 1; }
case "$#" in
0)
ccze -A | less -R
;;
*)
args=($@)
for (( i=0; i < $#; i++ )); do
[ -e "${args[$i]}" ] && { ccze -A < "${args[$i]}" | less -R; }
done
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment