Skip to main content
simplified
Source Link
Stéphane Chazelas
  • 586.8k
  • 96
  • 1.1k
  • 1.7k

If you want to use grep, you can do:

grep -avaxv '^'.*$'*' file 

in UTF-8 locales to get the lines that have at least an invalid UTF-8 sequence (this works with GNU Grep at least).

If you want to use grep, you can do:

grep -av '^.*$' file 

in UTF-8 locales to get the lines that have at least an invalid UTF-8 sequence (this works with GNU Grep at least).

If you want to use grep, you can do:

grep -axv '.*' file 

in UTF-8 locales to get the lines that have at least an invalid UTF-8 sequence (this works with GNU Grep at least).

Source Link
vinc17
  • 12.5k
  • 44
  • 50

If you want to use grep, you can do:

grep -av '^.*$' file 

in UTF-8 locales to get the lines that have at least an invalid UTF-8 sequence (this works with GNU Grep at least).