Files

pawk – brings Python expressions and statements to AWK-style workflows

pawk is a command-line text processing utility that brings Python expressions and statements to AWK-style workflows.

It reads from standard input and lets you filter, transform, and summarize line-oriented data using Python syntax, making it useful for shell pipelines, ad hoc analysis, and quick text manipulation tasks where Python’s data structures and modules are more expressive than traditional AWK.

This is free and open source software.

Key Features

  • Processes input line by line using Python expressions or statements.
  • Supports AWK-like pattern matching and field-based text processing.
  • Provides begin and end blocks for initialization and final output.
  • Can use the first row as named header fields for subsequent rows.
  • Automatically imports referenced Python modules, with optional explicit imports.
  • Supports whole-file processing through end-block access to accumulated input.
  • Offers configurable input, output, and line delimiters.
  • Includes an option to modify files in place.
  • Requires Python 3.7 or later.

Website: github.com/alecthomas/pawk
Support:
Developer: Alec Thomas
License: MIT License

PAWK help

pawk is written in Python. Learn Python with our recommended free books and free tutorials.


Related Software

Alternatives to awk
gawkImplementation of the awk programming language
GoAWKPOSIX-compliant awk interpreter written in Go
MillerSmall and powerful CLI tool to do all your data processing
frawkSmall programming language for writing short programs processing textual data
chooseHuman-friendly and fast alternative to cut and (sometimes) awk
gemaGeneral purpose text processing utility based on the concept of pattern matching
mawkInterpreter for the awk programming language
ruplacerFind and replace text in source files
rawkPOSIX compatible AWK written in Rust
wakawk implementation for toybox and standalone
PAWKPython line processor
HawkHaskell text processor for the command-line

Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted