macOS
brew install greplocal Homebrew formula metadata
sudo port install grepMacPorts ports tree · sysutils/grep/Portfile · ソース: api.github.com
brew
grep のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。
インストール
brew install greplocal Homebrew formula metadata
sudo port install grepMacPorts ports tree · sysutils/grep/Portfile · ソース: api.github.com
sudo apk add grepAlpine Linux edge package indexes · grep · ソース: dl-cdn.alpinelinux.org
sudo dnf install grepFedora Rawhide package metadata · grep · ソース: dl.fedoraproject.org
sudo pacman -S grepArch Linux sync databases · grep · ソース: geo.mirror.pkgbuild.com
sudo zypper install grepopenSUSE Tumbleweed package metadata · grep · ソース: download.opensuse.org
choco install grepChocolatey community package catalog · grep · ソース: community.chocolatey.org
scoop install main/grepScoop official bucket manifest trees · bucket/grep.json · ソース: api.github.com
概要
GNU grep, egrep and fgrep
履歴
GNU grep is the GNU Project's implementation of grep, the Unix text-search utility whose name comes from the ed command pattern g/re/p. As a package, it is one of the canonical command-line tools: tiny at the interface, deep in implementation, and present in nearly every Unix-like software collection.
The original grep came from early Unix culture at Bell Labs; GNU grep belongs to the later free-software lineage that reimplemented core Unix utilities for the GNU operating system and for portable Unix-like environments. Package managers care about both stories: grep is a standard shell verb, while GNU grep brings GNU options, performance engineering, and portability.
The Unix oral-history account attributes the original grep idea to Doug McIlroy asking Ken Thompson to lift the regular-expression recognizer out of the editor into a one-pass program. That origin explains the enduring shape of grep: read input sequentially, match a pattern, and print selected lines.
GNU grep's source distribution credits Mike Haertel with the main program and the DFA and kwset matchers, Isamu Hasegawa and others with the POSIX regular-expression matcher, James Woods with early Boyer-Moore-style filtering ideas, and later maintainers including Alain Magloire, Bernhard Rosenkranzer, Stepan Kasal, Tony Abou-Assaleh, Jim Meyering, and Paolo Bonzini.
GNU grep's implementation history is unusually important for such a familiar command. The README describes a lazy-state deterministic matcher combined with Boyer-Moore and Aho-Corasick fixed-string searches, allowing the program to reject impossible input before invoking the full regular-expression matcher. That performance lineage is why GNU grep is discussed not only as a utility but also as an example of practical string-search engineering.
grep became part of the ordinary Unix vocabulary because it solves a primitive shell need: find matching text in streams and files. GNU grep extended that role across GNU/Linux systems and other Unix-like package sets, while Homebrew and other macOS package managers package it for users who want GNU behavior alongside or instead of platform grep.
The GNU project page documents stable source releases on GNU download servers, Git development through Savannah, bug and commit mailing lists, translation infrastructure, and the manual. That is the classic GNU adoption model: tarball releases, public development, man/info documentation, and downstream distribution through operating-system packages.
At the interface, GNU grep searches one or more input files for lines matching one or more patterns and prints matching lines by default. Its ordinary forms cover basic regular expressions, extended regular expressions through grep -E, fixed strings through grep -F, pattern files through -f, recursive search, context lines, filename and line-number prefixes, binary-file behavior, and optional color highlighting.
GNU grep also carries decades of compatibility decisions. The manual marks POSIX-specified options, labels GNU long options as extensions, and documents behavior across encodings, binary data, directories, and performance-sensitive pattern sets. That combination makes it both a user command and a portability boundary for shell scripts.
GNU grep is package-nerd significant because it sits in the base-toolchain layer. Scripts, build systems, test harnesses, log pipelines, and interactive shell sessions assume some grep-like command exists, but exact behavior can differ between GNU, BSD, BusyBox, and other implementations.
The egrep and fgrep names show the packaging tension clearly. GNU grep 2.5.3 deprecated those separate commands in 2007, and GNU grep 3.8 began warning that they are obsolescent in favor of grep -E and grep -F. Package maintainers still have to decide how to ship compatibility links while nudging users toward the POSIX-style option forms.
For macOS package users, GNU grep is also a namespace package: Homebrew installs GNU utilities in ways that avoid silently replacing system tools unless users opt into GNU-prefixed commands or path changes.
セキュリティ状態
narrow executable package without higher-risk signals.
リスク グリーン · 信頼度 低 · appliance
エージェントに無人実行させる前に、このツールが平文の認証情報を読むか、リモート状態を書き込むか、成果物を公開するか、プラグインを起動するかを確認してください。
実行可能ファイル
| コマンド | 種類 | 公開範囲 | メモ |
|---|---|---|---|
egrep | cli | グローバル実行可能ファイル | |
fgrep | cli | グローバル実行可能ファイル | |
grep | cli | グローバル実行可能ファイル |
鮮度
これらの信号は、ページ生成時期、パッケージマネージャの活動、上流リリース比較を分けて示します。バージョン遅れは、証拠 URL と比較可能なバージョンがある場合だけ警告されます。
https://www.gnu.org/software/grep/
インストールメタデータ
| パッケージキー | brew:grep |
|---|---|
| バージョン | 3.12 |
| パッケージマネージャ | Homebrew |
| パッケージマネージャページ | https://formulae.brew.sh/formula/grep |
| ホームページ | https://www.gnu.org/software/grep/ |
| リポジトリ | https://git.savannah.gnu.org/git/grep.git |
| 上流ドキュメント | https://www.gnu.org/software/grep/manual |
| ライセンス | GPL-3.0-or-later |
| ソースアーカイブ | https://ftpmirror.gnu.org/gnu/grep/grep-3.12.tar.xz |
| 依存関係 | pcre2 |
| ビルド依存関係 | pkgconf |
| Bottle | 利用可能 (対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定義 |
| サービス | 宣言なし |
| 注意点 | All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc like: PATH="$HOMEBREW_PREFIX/opt/grep/libexec/gnubin:$PATH" |
レジストリ情報
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | grep |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
ソースデータベース一致
一致は外部パッケージマネージャインデックスから取得され、ローカルの Automic Vault パッケージリンクとは分けて表示されます。
grep 3.11-4
GNU grep, egrep and fgrep
https://www.gnu.org/software/grep/
sudo apt install grepgrep 3.11-4build1
GNU grep, egrep and fgrep
https://www.gnu.org/software/grep/
sudo apt install grepgrep 3.12-r0
Searches input files for lines containing a match to a specified pattern
https://www.gnu.org/software/grep/grep.html
sudo apk add grepgrep-doc 3.12-r0
Searches input files for lines containing a match to a specified pattern (documentation)
https://www.gnu.org/software/grep/grep.html
sudo apk add grep-docgrep 3.12-3.fc44
Pattern matching utilities
https://www.gnu.org/software/grep/
sudo dnf install grepgrep 3.12-2
A string search utility
https://www.gnu.org/software/grep/
sudo pacman -S grepgrep 3.12-1.3
Print lines matching a pattern
https://www.gnu.org/software/grep/
sudo zypper install grepgrep-lang 3.12-1.3
Translations for package grep
https://www.gnu.org/software/grep/
sudo zypper install grep-langgrep
sudo port install grepgrep
choco install grepmain/grep
scoop install main/grepソース経路
このページは scripts/generate-pkg-sqlite.py が生成した非公開のパッケージ SQLite アーティファクトから av-web によって提供されます。
View the package source record on GitHub.