awk.bzl
v0.1.2
published 2 months ago
2 stars
1 forks
0 watchers
Apache License 2.0
public
4 assets
329 downloads
31 KB
Compatibility level 1
4ByVDgTzNnPUXMfFQPBAWKdCy7dHyW3w82n7Tc8JUhQ=
Maintained byAlex Eagle
v0.1.2
May 30, 2025
[expand for release notes]

Bazel rule for awk(1)

Installation

Follow instructions from the release you wish to use: https://github.com/alexeagle/awk.bzl/releases

Usage

load("@awk.bzl", "awk")

awk(
    name = "csv",
    src = "sample.csv",
    out = "changed.txt",
    field_separator = ",",
    # Discard the header line; print columns 1 and 3 of other lines
    program = "NR > 1 { print $1, $3 }",
)

See many more examples in examples.