# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, zypper 安装 mawk

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

## 安装

```sh
sudo av install brew:mawk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mawk
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mawk
```

  证据: MacPorts ports tree: lang/mawk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add mawk
```

  证据: Alpine Linux edge package indexes: mawk from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install mawk
```

  证据: Debian stable package indexes: mawk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install mawk
```

  证据: Fedora Rawhide package metadata: mawk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mawk
```

  证据: nixpkgs package indexes: pkgs/by-name/ma/mawk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install mawk
```

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

## 软件包事实

- **软件包键:** brew:mawk
- **软件包管理器:** Homebrew
- **版本:** 1.3.4-20260302
- **来源摘要:** Interpreter for the AWK Programming Language
- **主页:** <https://invisible-island.net/mawk/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mawk (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.3.4-20260302
## 项目历史与用法

mawk is a compact AWK interpreter used for fast pattern scanning, text processing, and shell scripting.

### 项目历史

The current official mawk page says Mike Brennan wrote mawk, that it had no maintainer for a time, and that Thomas E. Dickey adopted it in 2009 by starting with Debian package fixes and unresolved reports. The official changelog preserves the older 1.3 series history and shows the long maintenance gap being bridged by Debian patches and later upstream work.

The manpage frames mawk as a 'new awk' implementation of the AWK language defined by Aho, Kernighan, and Weinberger, with POSIX draft compatibility and a small set of implementation extensions.

### 采用历史

mawk's adoption has been strongest in Unix-like packaging culture. The official page lists package links for AIX, Arch, DragonFly BSD, Fedora, Fink, FreeBSD, Gentoo, Haiku, Homebrew, HPUX, MacPorts, Mageia, and others, and the input confirms distribution through common Linux and macOS package managers.

### 使用方式

Users invoke `mawk` like other AWK implementations: short programs can be passed on the command line, longer programs via `-f`, and input comes from files or standard input. Its `-W` options expose mawk-specific behavior such as dump, interactive mode, POSIX mode, traditional mode, and version output.

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

mawk matters because AWK is one of the classic packaging and build-script workhorses. It gives packagers a small, fast AWK implementation whose behavior must be tracked carefully against POSIX awk, BWK awk, and GNU awk.

### 时间线

- 1996: mawk 1.3 and 1.3.2 releases appear in the official changelog.
- 2008: Debian patches are incorporated into the later upstream maintenance history.
- 2009: Thomas E. Dickey adopts mawk maintenance.
- 2010: 1.3.4 maintenance snapshots begin after the original 1.3.3 plus Debian patches baseline.
- 2026: Official changelog still records active maintenance.

### Related projects

- awk, BWK awk, GNU awk, POSIX awk, Debian mawk package

### 来源

- <https://invisible-island.net/mawk/>
- <https://invisible-island.net/mawk/CHANGES.html>
- <https://invisible-island.net/mawk/manpage/mawk.html>
- source_facts.package-manager-url


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

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

- Debian apt - mawk - 1.3.4.20250131-1: normalized package name match | Debian stable package indexes: mawk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Pattern scanning and text processing language | https://invisible-island.net/mawk/
- Nix - mawk: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/mawk/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mawk - 1.3.4.20240123-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mawk from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Pattern scanning and text processing language | https://invisible-island.net/mawk/
- apk - mawk - 1.3.4_p20260302-r0: normalized package name match | Alpine Linux edge package indexes: mawk from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | mawk is an interpreter for the AWK Programming Language | https://invisible-island.net/mawk/
- apk - mawk-doc - 1.3.4_p20260302-r0: normalized package name match | Alpine Linux edge package indexes: mawk-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | mawk is an interpreter for the AWK Programming Language (documentation) | https://invisible-island.net/mawk/
- dnf - mawk - 1.3.4-8.20260302.fc45: normalized package name match | Fedora Rawhide package metadata: mawk from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Interpreter for the AWK programming language | https://invisible-island.net/mawk/
- zypper - mawk - 1.3.4.20240622-1.8: normalized package name match | openSUSE Tumbleweed package metadata: mawk from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Implementation of New/POSIX AWK | https://invisible-island.net/mawk/mawk.html
- MacPorts - mawk: normalized package name match | MacPorts ports tree: lang/mawk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/mawk.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mawk.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
