# 使用 Homebrew, chocolatey, pacman, zypper 安装 awk

查看 awk 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:awk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install awk
```

  证据: local Homebrew formula metadata

### Linux

- pacman (92%):

```sh
sudo pacman -S gawk
```

  证据: Arch Linux sync databases: gawk from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install gawk
```

  证据: openSUSE Tumbleweed package metadata: gawk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install awk
```

  证据: Chocolatey community package catalog: awk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','autodesk-fusion360'

## 软件包事实

- **软件包键:** brew:awk
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/awk>
- **版本:** 20260426
- **来源摘要:** Text processing scripting language
- **主页:** <https://www.cs.princeton.edu/~bwk/btl.mirror/>
- **仓库:** <https://github.com/onetrueawk/awk>
- **上游文档:** <https://awk.dev/>
- **许可证:** SMLNJ
- **源码归档:** <https://github.com/onetrueawk/awk/archive/refs/tags/20260426.tar.gz>
- **已生成:** 2026-07-26T07:20:29+00:00

## 可执行文件

- awk (cli)
- awk (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-26
- 管理器版本: 20260426
- 本地数据: OK
- 上游仓库: https://github.com/onetrueawk/awk
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

One True Awk is Brian Kernighan's maintained awk implementation, packaged by Homebrew as awk. It is the direct lineage most Unix people mean when they say awk as a small pattern-action language for scanning text, selecting fields, computing summaries, and printing reports.

### 项目历史

Awk was developed at Bell Labs by Alfred Aho, Brian Kernighan, and Peter Weinberger. The original paper, referenced from the official awk.dev site, describes awk as a pattern scanning and processing language; the 1985 technical report covered the expanded language that became the basis for the 1988 book.

The official awk.dev page for The AWK Programming Language, Second Edition says the first edition was written by Aho, Kernighan, and Weinberger in 1988, and points to the maintained source at github.com/onetrueawk/awk. That repository is the modern home for the implementation commonly called One True Awk.

### 采用历史

Awk spread through Unix culture because it sits between grep, sed, cut, and a full programming language. Its pattern-action model lets shell users write small data programs directly in pipelines without compiling anything or creating a larger script project.

The 2023 second edition of The AWK Programming Language and the continuing maintenance of the onetrueawk repository are part of awk's unusual afterlife: an old Unix language remains relevant because CSV-ish logs, columnar text, and quick data checks have not gone away.

### 使用方式

Typical usage is inline and pipeline-oriented: match records, split fields, accumulate counters, transform columns, and print reports. The man page and historical papers emphasize scanning input lines for patterns and executing actions for matching lines.

There is no project-specific config or credential file. Awk programs are supplied on the command line or in script files, and behavior is controlled by variables, input files, and environment inherited from the shell.

### 为什么软件包爱好者会关心

For package nerds, awk is a tiny package with oversized cultural weight. It overlaps with POSIX awk, BWK awk, gawk, mawk, and system-provided /usr/bin/awk, so the packaging question is often which awk you are intentionally installing rather than whether awk exists at all.

Homebrew's awk formula is useful on macOS because it gives users a current One True Awk without replacing the system awk. That makes it attractive for people testing portability, newer awk fixes, or scripts that should stay close to the original language rather than GNU awk extensions.

### 时间线

- 1979: The original Awk paper appeared in Software: Practice and Experience.
- 1985: Bell Labs technical report CSTR 118 documented the expanded awk language.
- 1988: The first edition of The AWK Programming Language was published.
- 2023: The AWK Programming Language, Second Edition was published with an official companion site.
- 2026: awk.dev continues to point users to the maintained onetrueawk source repository.

### Related projects

- GNU awk, or gawk, is the GNU Project implementation and has its own manual and release stream.
- mawk is another long-lived awk implementation focused on speed and small size.
- sed, grep, cut, perl, and shell are neighboring tools in the same Unix text-processing workflow.

### 来源

- <https://awk.dev/>
- <https://github.com/onetrueawk/awk>
- <https://github.com/onetrueawk/awk/blob/master/awk.1>
- <https://www.cs.princeton.edu/~bwk/>
- source_facts.description
- source_facts.repo


## 安全说明

没有找到 awk 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** awk
- **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:** head, stable

## 其他软件包管理器记录

- pacman - gawk - 5.4.0-1: normalized package name match | Arch Linux sync databases: gawk from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | GNU version of awk | https://www.gnu.org/software/gawk/
- zypper - gawk - 5.4.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: gawk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Domain-specific language for text processing | https://www.gnu.org/software/gawk/
- Chocolatey - awk: normalized package name match | Chocolatey community package catalog: awk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','autodesk-fusion360'


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Language runtime packages](https://www.automicvault.com/zh-hans/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [rhai](https://www.automicvault.com/zh-hans/pkg/brew/rhai/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [mawk](https://www.automicvault.com/zh-hans/pkg/brew/mawk/) - Shares av.db curated category or tags: awk, cli, language-runtime, text-processing.
- [rad](https://www.automicvault.com/zh-hans/pkg/brew/rad/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [rune](https://www.automicvault.com/zh-hans/pkg/brew/rune/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [cbmbasic](https://www.automicvault.com/zh-hans/pkg/brew/cbmbasic/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [chaiscript](https://www.automicvault.com/zh-hans/pkg/brew/chaiscript/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [goawk](https://www.automicvault.com/zh-hans/pkg/brew/goawk/) - Shares av.db curated category or tags: awk, cli, language-runtime.
- [jimtcl](https://www.automicvault.com/zh-hans/pkg/brew/jimtcl/) - Shares av.db curated category or tags: cli, language-runtime, scripting-language.
- [libpinyin](https://www.automicvault.com/zh-hans/pkg/brew/libpinyin/) - Local package facts share a topical domain. Shared terms: cli, language, language-runtime, processing, runtime.

## Combined YAML source

View the package source record on GitHub. [combined/awk.yml](https://github.com/automic-vault/db/blob/main/combined/awk.yml)


## 来源

- Nucleus package database
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
