The Awk Programming Language
awk.dev
The Awk Programming Language
1–10 of 159 posts
Re: The Awk Programming Language
#2Re: The Awk Programming Language
#3Awk has always been a language that I loved but I have struggled to use besides quick jobs for parsing text files. I understand it is meant to be use for exactly that, but the fact that is simple, fast and lightweight sometimes makes me want to do something more with it, but when I start trying to do something besides parsing text I find that it starts becoming awkward (pun intented?).
I see awk as a DSL to be honest. Yes, it can be used as a general purpose language, but that quickly becomes, as you say, awkward :D
Like many DSLs, it is simple, fast and lightweight as long as it is used for it's intended purpose. Once you start using it for something else, these advantages evaporate pretty quickly, because then you have to essentially work around the DSL design to get it to do what you want.
Re: The Awk Programming Language
#4Re: The Awk Programming Language
#5See https://hn.algolia.com/?q=The+AWK+Programming+Language for discussion on the first edition
Didn't know there was a list of `awk` implementations: https://www.gnu.org/software/gawk/manual/html_node/Other-Ver...
Re: The Awk Programming Language
#6Awk has always been a language that I loved but I have struggled to use besides quick jobs for parsing text files. I understand it is meant to be use for exactly that, but the fact that is simple, fast and lightweight sometimes makes me want to do something more with it, but when I start trying to do something besides parsing text I find that it starts becoming awkward (pun intented?).
Re: The Awk Programming Language
#7Awk has always been a language that I loved but I have struggled to use besides quick jobs for parsing text files. I understand it is meant to be use for exactly that, but the fact that is simple, fast and lightweight sometimes makes me want to do something more with it, but when I start trying to do something besides parsing text I find that it starts becoming awkward (pun intented?).
Re: The Awk Programming Language
#8Who wrote the second edition?
Re: The Awk Programming Language
#9Who wrote the second edition?
Re: The Awk Programming Language
#10The language has some quirks. To declare temporary variables, it's common practice to add extra arguments to functions that won't be used. And traversal of associative arrays is implementation-dependent. I'm not sure what the situation is regarding locale and UTF-8 support.
EDIT: Looks like Brian Kernighan added Unicode support last year.[1]
[0] https://github.com/siraben/awk-vm/blob/master/vm.awk
[1] https://github.com/onetrueawk/awk/commit/9ebe940cf3c652b0e37...