Skip to content

grcat: add grcat command for gawk library routines#62

Open
Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:fix-issue#60-add-grcat
Open

grcat: add grcat command for gawk library routines#62
Franklin-Qi wants to merge 1 commit into
uutils:mainfrom
Franklin-Qi:fix-issue#60-add-grcat

Conversation

@Franklin-Qi

Copy link
Copy Markdown
Contributor

Add a Rust implementation of grcat, the helper binary shipped by GNU awk under lib/awk/. It dumps the group database in /etc/group format via POSIX getgrent()/endgrent(), matching the program described in the GNU Awk User's Guide and used by gawk library routines such as group.awk.

  • Register the grcat binary in Cargo.toml with a unix-only libc dependency
  • Handle BrokenPipe on stdout writes without exiting with an error
  • Add integration tests for output format and parity with getent group

Closes #60

@Franklin-Qi Franklin-Qi changed the title packaging: add grcat command for gawk library routines grcat: add grcat command for gawk library routines Jul 3, 2026
@oech3

oech3 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Can we avoid unsafe libc using nix or rustix?

@Alonely0 Alonely0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my end, same comments as in the other PR.

Add a Rust implementation of grcat, the helper binary shipped by GNU awk
under lib/awk/. It dumps the group database in /etc/group format via
POSIX getgrent()/endgrent(), matching the program described in the GNU
Awk User's Guide and used by gawk library routines such as group.awk.

- Register the grcat binary in Cargo.toml with a unix-only libc dependency
- Handle BrokenPipe on stdout writes without exiting with an error
- Add integration tests for output format and parity with getent group

Closes uutils#60
@Franklin-Qi Franklin-Qi force-pushed the fix-issue#60-add-grcat branch from c34a15a to e9e2863 Compare July 6, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add grcat command

3 participants