Created
March 3, 2024 00:47
-
-
Save jnbdz/e8d16a5b8f5b0e3f69ce98870a503303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '{if (!match($0, /^[[:print:]\t\n\r]+$/)) print NR, $0}' ~/.bash_history |
cat ~/.bash_history | grep sublime
grep: (standard input): binary file matches
grep -a
-a, --text
Process a binary file as if it were text; this is equivalent to the --binary-files=text option.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Breaking Down the Command
This command helps you identify lines that might contain binary data by excluding those that consist only of characters safe for text files. Lines printed as a result of this command warrant closer inspection, as they contain characters outside the specified range, potentially indicating the presence of binary data.