awk
Awk-Batteries
awk | Awk-Batteries | |
---|---|---|
2 | 8 | |
5 | 12 | |
- | - | |
10.0 | 1.8 | |
over 8 years ago | over 2 years ago | |
Awk | Awk | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
awk
-
Awk: Power and Promise of a 40 yr old language (2021)
Yep, functions! I used to write a fair amount of Awk code back in the late '80s and early '90s. I treated Awk as a "real" programming language and tried to make the code nice and readable. This of course involved a lot of use of functions.
I only have a couple of surviving examples of the code from back then, but here they are for the curious:
https://github.com/geary/awk
LJPII.AWK is probably the best example. It made a nicely formatted printout of source code on my HP LaserJet II printer. I wish I had one of the printouts it generated, but they are long gone.
Hmm... I wonder if my Brother printer supports the old LaserJet II control codes? Or maybe there is an emulator online?
The code was written for Thompson Awk (TAWK), so some bits would need to be adapted to modern Awks.
-
Understanding Awk
I used to love Awk! I still do, even if I don't use it much any more.
Awk has a reputation for being hard to read (as noted in stevebmark's comment), but when I was using it actively, I tried to treat it as a serious programming language and write readable programs in it.
Several years ago I tracked down a couple of my old Awk programs from around 1990 and posted them here:
https://github.com/geary/awk
SHANEY.AWK is an implementation of the infamous Mark V. Shaney:
https://www.clear.rice.edu/comp200/09fall/textriff/sci_am_pa...
This was probably the first program that made me really impressed with Awk. People were writing rather complicated Shaney implementations in C, and I thought, "this could be really simple in Awk." And it was!
LJPII.AWK is the Awk program I'm most proud of. This was in the days when we had tiny screens and no multiple monitors and you always printed out your code to read it. In my circles we also fond of inserting "separator lines" between functions, in various formats such as this one:
// - - - - - - - - - - - - - - - - - -
Awk-Batteries
-
The Awk Programming Language, Second Edition
It's nice that everyone is supporting this, I've written a portable awk module that takes control of the parsing and it is SLOW (and a little buggy). I'm a little bummed that nobody will use it but this is truly a step in the right direction.
I guess for the people that are still using nawk, you can set up an AWK envvar so you can { awk -f $AWKU/ucsv.awk -f <(echo '{print NR, $1}') }
https://github.com/Nomarian/Awk-Batteries/blob/master/Units/...
-
Need help with awk script that keeps giving me syntax errors
if you have gawkextlib, you can -i csv, you can also download this and put it in your $AWKPATH then you just -i ucsv and use the csv file as normal. if you need an array with headers let me know.
-
Modernizing AWK, a 45-year old language, by adding CSV support
I wrote a parser that does what -F, does but correctly, you can see that its actually very difficult. Not only that, but there are extensions to csv, some csv have a header which means that instead of $1 $2 $3 ..., you just name the field instead, which means you have to ignore the first record. there's also other things, but csv is a difficult format to parse.
- Using AWK with CSV Files
-
Python was listed on "Harmful things", but why though ? http://harmful.cat-v.org/software
My attempt in awk
- Understanding AWK
- Understanding Awk
-
Getting better at Linux with mini-projects
awk lua
What are some alternatives?
busybox-w32 - WIN32 native port of BusyBox.
microperl-standalone