Bug 13871 - [feature request] grep switches for excluding binary files or certain file extensions
Summary: [feature request] grep switches for excluding binary files or certain file ex...
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-27 09:55 UTC by Vadim Kantorov
Modified: 2021-06-27 09:55 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Kantorov 2021-06-27 09:55:42 UTC
These are useful for recursive grepping to avoid (slow and useless) printing spurious matches in binary files (such as images).

OpenBSD grep supports "-I" to ignore binary files: https://man.openbsd.org/grep.1

FreeBSD grep supports both "-I" and "--exclude": https://www.freebsd.org/cgi/man.cgi?query=grep&sektion=&n=1