alecthomas / alecthomas/pawk

I made some improvements

Offen
#26 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
523
Forks
32
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi!

Love having the power of power of python with the convenience of awk, thanks for the great work!

I did miss the ability of awk to match against specific columns, so I altered pawk.py to enable this:

`pawk 'f[0] ~ // '`

now matches the pattern against the first column

I also added an option -R to read a file instead of reading from stdin (or overwriting the file if using -I) - apart from being used on its own it is also a good "preview" of changes before running with -I

I also updated the tests and added a test for parsing commands with columns.

Feel free to include my changes in your project (or if you prefer you can make a feature branch and add me with write access to that branch and I'll serve you a finished PR-merge request)

[pawk.py](https://github.com/user-attachments/files/24037910/pawk.py)
[pawk_test.py](https://github.com/user-attachments/files/24037480/pawk_test.py)

Tor

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.