Files
general-scripts-and-system-…/customscripts/find_bytes
T
2025-08-02 14:00:39 -06:00

13 lines
352 B
Bash

#!/bin/bash
if [ -z "$1" -o -z "$2" ]; then
echo -e "usage:\n\tfind_bytes <bytes regex> <path> \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 '<bytes regex>' "<path>"
ug -W -z -R $1 $2
fi