Linux - grep - Binary file (standard input) matches: различия между версиями

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Перейти к:навигация, поиск
(Новая страница: «=== Linux - grep - Binary file (standard input) matches === При использовании grep без параметров - возможна ошибка:...»)
 
 
Строка 1: Строка 1:
 +
[[Файл:B_1.gif |link=https://bit.ly/3tbFsd6| Доступная цена]]
 +
 
=== Linux - grep - Binary file (standard input) matches ===
 
=== Linux - grep - Binary file (standard input) matches ===
  

Текущая версия на 08:47, 15 декабря 2022

Доступная цена

Linux - grep - Binary file (standard input) matches

При использовании grep без параметров - возможна ошибка:

Binary file (standard input) matches

Решается добавлением ключа -a:

-a, --text
Process a binary file as if it were text; this is equivalent to the --binary-files=text option.
Пример:
# egrep -a text /var/log/messages

Ошибка означает, что grep принимает какие-то символы за бинарные данные. Чтобы все двоичные данные принимались за текстовые - нужно добавить опцию -a