Grep

GNU grep
Скриншот программы GNU grep
Тип утилита UNIX[вд]
Автор Кен Томпсон
Разработчик Кен Томпсон
Операционные системы UNIX и Unix-подобная операционная система
Языки интерфейса Английский и другие
Дата выпуска 1973
Состояние Активный
Сайт gnu.org/software/grep/
Логотип Викисклада Медиафайлы на Викискладе

grep — утилита командной строки, которая находит на вводе строки, отвечающие заданному регулярному выражению, и выводит их, если вывод не отменён специальным ключом. Название представляет собой акроним английской фразы «search globally for lines matching the regular expression, and print them» — «искать везде строки, соответствующие регулярному выражению, и выводить их».

Изначально была создана для операционной системы UNIX.

Существуют модификации grep: egrep (с обработкой расширенных регулярных выражений), fgrep (трактующая символы $*[]^|()\ буквально), rgrep (с включённым рекурсивным поиском). Как сказано в руководстве man (с точностью до перевода) «egrep — то же самое, что grep -E. fgrep — то же самое, что grep -F. rgrep — то же самое, что grep -r».

См. также

  • pgrep — grep по ps.
  • sed — замена текста.

Литература

  • John Bambenek and Agnieszka Klus. grep. Pocket Reference. — O’Reilly Media, 2009. — 77 p. — ISBN 978-0-596-15360-1.
  • Фэй Уильямс. grep Супер-поиск по команде // LinuxFormat. — 2010, июль. — 7 (133). — С. 46—47.
  • Tony Bradley. Ubuntu Linux, Day 19: Using 'man' and 'grep' // PCWorld. — Jun 19, 2011.
  • Tim McIntire. UNIX tips and tricks for a new user, Part 3: Introducing filters and regular expressions -> Searching files with grep (англ.) (12 мая 2006). — IBM developerWorks. Дата обращения: 22 августа 2013. Архивировано из оригинала 25 сентября 2011 года.

Ссылки

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.