#!/bin/bash if [ -z "$1" -o -z "$2" ]; then echo -e "usage:\n\tfind_bytes \n\t\tex. find_bytes '[\x{20}]' /path/to/dir" exit else # ugrep # -W hexdump binary matches, while keeping text matches as text # -z decompress files if need be to scan them # -R recursive # ug -W -z -R '' "" ug -W -z -R "'$1'" "$2" fi