#gawk

tiagoafpereira 🚲📷⌨️tiagoafpereira
2025-06-04

On migrating from Pocket, file conversions and link rot.

Learned a few things about and and ended up picking to get it done.

tiagoafpereira.net/blog/posts/

2025-04-12

Gawk is such a wonderful program with such a wonderful and progressive type system. It doesn't assign types right at their birth, no, it let's them explore first and then choose their type themselves.

Free Software Foundationfsf@hostux.social
2025-03-21

There are only 3 hours left to bid on #FreeSoftware #memorabilia! Bid now before time runs out: u.fsf.org/466 #FSF #FSF40 #GNU #Amiga3000UX #VT220 #TeX #Terminus-est #Savannah #gawk #lilypond #emacs

A group of photos of FSF 2025 silent auction items. From left to right, top row: from of an Amiga3000UX; a plush GNU with a black streak down the front and stripes on the side;  blue gnu head on a background of ones and zeros and gray and green mainboards as well as floating red, yellow, green, and purple gnus with a gray overlay; and a gnu brushing a dog. Top row, from left to right: a gnu pounding away at a typewriter, generating the GNU Manifesto; A framed award with text reading 'Presented to Richard Stallman The 2009 Merv Leitch, QC Memorial Visiting Chair University of Calgary Faculty of Law February 3, 2009' with the University of Calgary crest at the bottom; Framed award with text reading 'International Competition for Cyberarts PRIXARS 2005 Award of Distinction Digital Communities www.fsf.org www.gnu.org Free Software Foundation' with two signatures in the lower corners; and a terminus-est device
Free Software Foundationfsf@hostux.social
2025-03-19

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Ben Simms, Christian Ioneci, and David Masterson for assigning their copyright to the FSF! More at: u.fsf.org/463 #Emacs #gawk #CopyrightAssignments

Free Software Foundationfsf@hostux.social
2025-03-18

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Ben Simms, Christian Ioneci, and David Masterson for assigning their copyright to the FSF! More at: u.fsf.org/463 #Emacs #gawk #CopyrightAssignments

Free Software Foundationfsf@hostux.social
2025-03-09

Assigning your copyright to the FSF helps defend the GPL and keep software free. Thanks to Ben Simms, Christian Ioneci, and David Masterson for assigning their copyright to the FSF! More at: u.fsf.org/463 #Emacs #gawk #CopyrightAssignments

2025-01-18
Gea-Suan Lingslin@abpe.org
2024-12-17

把 APT 的 Legacy Format 轉成 DEB822

機器升級到 Ubuntu 24.04 後,/etc/apt 下面的預設格式都變成 DEB822 格式了,看起來在「[Spec] APT deb822 sources by default」這邊有討論。

舊有的格式還是會吃,但總是想翻掉,我依照我有遇到的 case (但不是所有 legacy format 的 case) 用 AWK 一行轉完:

gawk '{if ($1 ~ /^deb/) {prin

blog.gslin.org/archives/2024/1

#Computer #Linux #Murmuring #OS #Programming #Software #apt #awk #deb822 #debian #format #gawk #legacy #linux #mawk #ubuntu

2024-12-03

I taught myself a new programming language today: #gawk (#awk)

I'm pretty impressed at how clean and versatile it is.

Also, having a tutorial with very plain HTML-like layout and yellowish background helps enormously: grymoire.com/Unix/Awk.html

2024-10-16

I recently learned that you can make multiple statements in awk/gawk, separating them by semicolons, like many decent programming languages. This makes it relatively easy to assign various attributes and functions on extracted text to produce final output. Yes, even with a custom field splitter.

Managing quotation marks is still tricky, though.

I gotta share! Example for illustrative purposes:

gawk -F’\t’ ‘{sub(“old-value”, “new-value”, $1); gsub(“ “, “-“, $2); match($1, /^[a-z]+/,newArray); newVariable = $2 “ new text ” newArray[1]; print “My changed output: “ newVariable;}’ input-file.txt

In this example I’ve specified a field separator (specifying the creation of $ numbered variables from input), used 3 functions (one creating an array variable), assigned a variable, and output text to the command line—with text from the given input file. Changing the “print” statement to a “system” function (i.e. system(newVariable)) lets you run your output as commands. So very handy.

#CommandLine #Awk #Gawk

2024-09-19

Стилистический Анализатор: Синхронизация порядка объявлений и определений функций

У нас в организации есть обязательное правило оформления исходников, которое звучит так: Порядок объявления С-функций должен совпадать с порядком определения С-функций. В этом тексте представлен алгоритм работы консольной программы, которая автоматически выявляет нарушения этого странного правила.

habr.com/ru/articles/844436/

#ctags #awk #gawk #sed #cygwin #cmp #gcc #статический_анализ #стилистический_анализ #static_analysis

2024-09-13

@mos_8502 these concerns actually were core requirements when I was looking for a real language to rewrite #inxi to. #bash + #gawk were used initially for similar reasons but were a nightmare to work with. One and only one language met the feature stability + robustness + trustworthiness criteria: #Perl

I liked the results enough to start using it for advanced work tools too. Then I spun up inxi dev tools in perl. My life is better now. Inxi runs on 20 year old os, and on 386 + #slackware 9

2024-09-09

@racchio
To get more insight in what a script does, I sometimes do (with GNU awk AKA #gawk )
gawk --lint=$lintfile --dump-variables=$dumpfile --profile=$proffile ...
GNU awk also has a debugger, but I never used it; usually a few smartly placed
`printf "...",... >"/dev/stderr" ` statements are sufficient to find the problem.

Norman Wilsonoclsc@mstdn.ca
2024-07-10

Congratulation to Arnold Robbins, the primary guy behind #gawk (and also helping to look after the One True #Awk), recipient of this year's #USENIX #Flame lifetime-achievement award.

2024-02-11

@nixCraft github.com/TheMozg/awk-raycast Pseudo-3D shooter written completely in #gawk using raycasting technique #awk

2023-12-19

#awk #gawk

Does someone want to check a little awk script?

Not deep into the language, the script already does what it's supposed to do (filter birdc show proto all output by DN42 BGP routes and outputs the number of routes).

But I'm not sure if next is intended to be used that way.

uvokchee.de/bird.txt

2023-12-04

Before I started #adventofcode this year, I did a "day 0" with a trivial exercise and an excuse to get my test harness and makefiles in order. That was a good decision.

I also decided to do AOC23 in awk, and I think I have relearned enough awk to understand why its best use is the one-liner and where it's increasingly horrible as the programs get bigger and more complex.

So a decision and a poll.

#awk #gawk #python #aoc #aoc23

2023-12-03

Day 3 of #AdventofCode in the books.

One notable feature of gawk that's not in goawk is "arrays of arrays", so I have an extra credit task to convert my array handling to something more portable so that the job will build on goawk as well.

This was quite a bit harder than day 1 or day 2.

My solution pulled the whole data set into memory in one pass, then computed the answer in a second pass.. I think memory usage could have been smaller with a single pass.

#aoc #gawk #goawk #aoc23

2023-12-02

Things to like about gawk for Advent of Code.

1. Hardly anyone else is doing it that language, so less chance of spoilers.

2. Parsing the input file is very easy because a lot of boilerplate work is done or easy to do (implicit split of input field).

3. Associative arrays (key-value arrays) as a language primitive. Wikipedia has a Rosetta Stone of sorts on equivalences in other languages where they are sometimes called maps, hashes, or dictionaries.

en.wikipedia.org/wiki/Comparis

#gawk #aoc

Client Info

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