Проблема с двойной загрузкой 18.04: жесткий диск не найден после выхода из системы

Вы использовали -l, что противоположно тому, что вы хотите. Из man grep:

-l, --files-with-matches
      Suppress normal output; instead print the  name  of  each  input
      file  from  which  output would normally have been printed.  The
      scanning will stop on the first  match.   (-l  is  specified  by
      POSIX.)

Вы хотите -H:

-H, --with-filename
      Print the file name for each match.  This is  the  default  when
      there is more than one file to search.

Но это по умолчанию. Просто выполните:

grep -Er 'apple|banana|watermelon' .

(-E сообщает grep действовать как egrep.)

0
задан 2 May 2018 в 12:10

0 ответов

Другие вопросы по тегам:

Похожие вопросы: