Skip to content

Instantly share code, notes, and snippets.

@jnbdz
Created March 3, 2024 00:47
Show Gist options
  • Save jnbdz/e8d16a5b8f5b0e3f69ce98870a503303 to your computer and use it in GitHub Desktop.
Save jnbdz/e8d16a5b8f5b0e3f69ce98870a503303 to your computer and use it in GitHub Desktop.
awk '{if (!match($0, /^[[:print:]\t\n\r]+$/)) print NR, $0}' ~/.bash_history
@jnbdz
Copy link
Author

jnbdz commented Mar 3, 2024

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