$ cut -d ' ' -f 2- <file | grep -v '[^0 ]' | wc -l
2
Es decir, primero elimine la primera columna separada por espacios con cut
, luego grep
para las líneas que contienen solo ceros y espacios, luego cuente estas líneas.
O, usando grep
para hacer el conteo:
$ cut -d ' ' -f 2- <file | tr -d ' ' | grep -cx '00000000'
2
Вероятно, ваш html-файл имеет тип mime text/xml:
$ file my.html
my.html: XML 1.0 document, UTF-8 Unicode text, with very long lines
Установить приложение по умолчанию для открытия файлов XML:
$ xdg-mime default firefox.desktop text/xml