#awk

2025-11-18

@mike805

It depends on whether the CSV contains quoted commas (or the TSV contains quoted tabs-in-values, etc). If there aren't any quoted delimiters, all the tools above work fairly uneventfully.

If quoted text *can* contain the delimiter, things get messier, and I tend to reach for #awk which has broadly adopted the --csv flag that does a better job of handling the quoted delimiters. Or I reach for some of my custom tools that turn quoted-CSV into some other delimited format, either tab-delimited or ASCII-delimited¹ allowing other utilities to use them.


¹ ronaldduncan.wordpress.com/200

@jpmens

2025-11-17

You know when you create a dumb little tool because the grunt-work annoys you when doing a particular task, then that task drops in your lap, you whip out that tool, and suddenly it's fun again because you don't have to do the boring grunt work? Today was one of those days, using this little #awk script I threw together:

reddit.com/r/SQL/comments/1lpj

"Here's some tabular data with headers, how would I make a SQL query against it?" To do that I need to turn that tabular data into CREATE TABLE and INSERT statements to set up a mock version of the data so I can write queries against it. It's tedious even with a powerful $EDITOR. But turn it into an awk script and, with the data on the clipboard, I can just

$ xsel | create_table.awk | xsel -ib

and paste into something like db-fiddle.com, and it's mostly ready to go.

2025-11-15

insert prefix to each line of file if line is not blank otherwise do something else #bash #2204 #sed #awk #perl

askubuntu.com/q/1559722/612

2025-11-15

Der 8086-Assembler in #awk, an dem ich letzte Woche geschrieben hab, ist soweit fertig. Zumindest kann er alle Basis-opcodes als listing generieren. Intel-Hex und Binaries mach ich vielleicht später...

codeberg.org/ain/asm8086

N-gated Hacker Newsngate
2025-11-14

AWK notes: a riveting tale of why abandoning is super cool 🚀. Apparently, is like a bash with some forbidden array-returning , as learned from another guy's blog 📚. Who needs Python when you can AWK your way to obscurity? 😂
maximullaris.com/awk_tech_note

LavX Newslvxnews
2025-11-14

Ever wondered how a simple tool like AWK can supercharge your data processing? This hands-on tutorial uses Netflix stock data to explore AWK basics—from extracting columns to creating custom outputs. It's a reminder that efficient, open-source tools empower developers to tackle data ethically and effectively. What's your go-to for parsing files?

GripNewsGripNews
2025-11-14

🌘 AWK 技術筆記:深入解析其獨特機制
➤ 揭開 AWK 設計背後的巧妙與權衡
maximullaris.com/awk_tech_note
本文深入探討了 AWK 的內部技術機制,特別關注其無垃圾回收(GC)設計所帶來的影響,例如函數無法回傳陣列,以及局部變數的聲明方式。作者透過具體範例,解釋了自動擴展(Autovivification)、`$` 運算子的靈活性,以及自訂函數與內建函數在呼叫語法上的不一致性。此外,文章還剖析了 ERE 與除法運算之間的詞法分析歧義,以及為瞭解決此問題所採取的「Lexer Hack」方法,並分享了作者在開發 intellij-awk 解析器時的發現。
+ 這篇文章讓我對 AWK 的底層運作有了更深的認識,特別是無 GC 設計的影響,之前都沒注意到。
+ 作者解釋得很清楚,尤其是函數呼叫語法的差異和 ERE/DIV 的問題,對於想深入瞭解 AWK 的人非常有幫助。

Felix 🇨🇦 🇩🇪 🇺🇦fst@mstdn.io
2025-11-14

Already more than 10yrs old but I just stumbled over this great blog post showing an insanely fast local data processing pipeline simply using #find #xargs #awk .
I really like the use of xargs for parallelization here.

Command-line Tools can be 235x Faster than your Hadoop Cluster - Adam Drake
adamdrake.com/command-line-too

2025-11-13

Found in awk-pta's README, this great interview with Prof. Alfred Aho about the origins of AWK: a-z.readthedocs.io/en/latest/a

"it was born from the necessity to meet a need. As a researcher at Bell Labs in the early 1970s, I found myself keeping track of budgets..."

"Some Wall Street financial houses used AWK when it first came out to balance their books because it was so easy to write data-processing programs in AWK..."

Plot twist ! Is AWK the original #plaintextaccounting tool ??

#awk #gawk

2025-11-12

I have an inordinate fondness for a particular roll&write game that I purchased during lockdown. It works in a sort of "bingo mode" where one person throws three dice, and each player decides how to allocate each one for their particular sheet. It's a remarkable system, and I've finally managed to introduce some friends to it.

So I've been implementing it in #awk, such that the map and all of the details are populated via patterns that look like ASCII drawings of the game board, and then the rolls and the actions are different patterns that follow. So you have a sort of template header for the game, and then player moves beneath.

I really like this sort of log-structured DSL for stuff like this, and I'm specifically keeping it to #BusyBox AWK so that I know it's mostly POSIX. I even put my GAWK book back on the shelf and pulled down the new edition of Aho et. al. for this project.

I have to get to work tomorrow, but tonight I'm just delighted to tinker with it all!

2025-11-11

[Recording]
cjsawk: A self-hosted compiler for a subset of C, Javascript, and Awk - Liam Wilson
youtu.be/GvIdgExPF7M

#c #javascript #awk #programming

Deadly Headshotdheadshot
2025-11-09

@felix
I've learned quite a bit about the power of in the past year or so, starting with this: lipu.li/?u=DdlyH&p=power-of-awk . It's a great little tool!

2025-11-07

@ArneBab maybe it's just me but I would definitely add #AWK to loved languages. It's kind of perfect for what it does (data-driven stuff and combining it with other specialized command line tools) and it doesn't pretend to be the one language for everything

Martin Bishoptoomanysecrets
2025-11-06

The development of was driven by the philosophy, functionally filling a niche between simpler tools such as and and general-purpose programming languages like . awk provided a powerful, high-level scripting language for data processing, filtering, and transformation.

Martin Bishoptoomanysecrets
2025-11-06

Brian Kernighan was one of the three original authors of ‘awk’ (stands for Aho – Weinberger – Kernighan) developed in 1977 at Bell Labs. Kernighan, Aho, and Weinberger set out to develop a small interpreted language for text pattern scanning and reporting, essentially a scripting language for processing of structured text data.
art by @b0rk

2025-11-02

On a related note, I created a page of notes about the #Awk programming language. Kind of generic right now, but it's a start: felix.plesoianu.ro/languages/n

Stewart Russellscruss@xoxo.zone
2025-11-01

As I have somewhat tired of this script, I tidied it up and put it on github

average velocity of all moving TTC vehicles from GTFS feed — gist.github.com/scruss/cebe194

#awk #ttc #transit #gtfs

2025-10-31

@sen

Same.

There are enough similarities in the programming languages I most often use that I have trouble keeping track of the differences. So I keep making syntactic errors like a complete newb. Over and over again.

#C #Awk #PHP #Bash

Genervter Buchhaltergenervterbuchhalter
2025-10-30

Heute habe ich eine neue Buchhaltung übernommen und durfte in den CSV-Dateien erstmal mit AWK das Buchungsdatum einiger Buchungen korrigieren. Im betreffenden Jahr gab es den 29.2. nicht. Wie gehen andere mit solchen Problemen um…?

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst