Interesting! Just wondering why a whole new language for a feature? (Not to sound critical).
Are there any specialised optimizations specific to file i/o and parsing the file at lower level ? If so, it would be great to have it also as wrapper for other langaugaes. Any benchmarking ?
awk is a very old language (1977), predating scripting languages like perl and python. As part of Unix philosophy, it is used in combination with other Unix tools. It is simpler and faster to write than say a python script. Most awk uses are simple one-liners to extract particular columns.
It is indeed very fast as all it does is: For each line:
Check if line matches a pattern
Perform the associated action on the pattern
There was this famous article which showed that clever use of command-line tools can be several times faster than some big-data tools.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Interesting! Just wondering why a whole new language for a feature? (Not to sound critical).
Are there any specialised optimizations specific to file i/o and parsing the file at lower level ? If so, it would be great to have it also as wrapper for other langaugaes. Any benchmarking ?
🙂🙂
Hi Ishani,
awk
is a very old language (1977), predating scripting languages likeperl
andpython
. As part of Unix philosophy, it is used in combination with other Unix tools. It is simpler and faster to write than say apython
script. Mostawk
uses are simple one-liners to extract particular columns.It is indeed very fast as all it does is: For each line:
There was this famous article which showed that clever use of command-line tools can be several times faster than some big-data tools.