Adler32Checksum
As documented in the [[http://en.wikipedia.org/wiki/Adler-32 | Adler-32 Wikipedia article]]. {{{ awk . . . incurs the constant overhead of the # string hash function. It's a good thing that our keys # here . . .
4K - last updated 2008-12-31 12:05 UTC by pgas
AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . * [[goto]] * [[grouping arguments]] * [[hashbang]] * [[hash]] symbol * [[here document]]s * . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
BeforeAfterMatch
Problem: print the Nth record before or after a certain regular expression matches or, alternativley, . . . An alternative approach could be to use a hash to store the numbers of the records to print: . . .
3K - last updated 2009-02-28 20:38 UTC by waldner
comment
Comments are pieces of text or [[whitespace]] that can be included in a program to make the code more . . . can be inserted by prefixing them with a [[hash]] symbol. The [[awk]] interpreter will ignore . . . the [[hash]] symbol and any other characters that follow . . . interpreter print 'Hello!' # Comments after a hash sign are ignored }}} . . .
1K - last updated 2009-07-15 17:07 UTC by MarkHobley
Features of awk
The [[awk]] utility: * treats lines of a text as database records, which can be divided into fields. . . . [[assignment]]s from a single statement * the [[hashbang]] mechanism requires a switch in order to . . .
1K - last updated 2011-05-27 15:33 UTC by markhobley
FileAndBitJoinClone
== Problem Description This was difficult to hash out. Eventually the task was described as, "for each . . .
7K - last updated 2009-03-08 16:26 UTC by waldner
hash
== Prefixing comments == The hash symbol can be used as a prefix for inserting comments within an [[awk]] . . . interpreter print 'Hello!' # Comments after a hash sign are ignored }}} . . .
1K - last updated 2010-11-08 22:37 UTC by markhobley
hashbang
== A script can be treated as an executable file by using a hashbang == It is possible for an awk script . . . be treated as an executable file by including a hashbang line as the first line of the script. === . . . The hashbang needs a switch === Because of the way that . . . to include a -f command line switch on the hashbang line. This enables the system to run the awk . . . the appropriate command line for the script. The hashbang line should read as follows: {{{ #!/usr/bin/awk . . .
1K - last updated 2010-11-28 19:04 UTC by markhobley
Hello World in awk
This example program outputs the words "hello world" to the terminal: {{{ awk # Hello World BEGIN { print . . . by the [[awk]] interpreter, which ignores the [[hash]] symbol and any other characters that follow . . . awk interpreter print 'Hello' # Comments after a hash sign are ignored }}} === Begin Blocks The [[BEGIN]] . . .
2K - last updated 2010-11-11 19:16 UTC by markhobley
include
The [[awk]] extraction and reporting language does not support the use of include files. However, it . . . should not be more than one filename on the hashbang line_ It is not permissible to pass the name . . . of additional source files through a hashbang line, because there should not be more than . . . one parameter on the hashbang line after the interpreter name. The following . . . hashbang line will not work: {{{ #!/usr/bin/awk -f . . .
2K - last updated 2013-03-30 10:38 UTC by markhobley
Invoking an awk program
=== Throwaway one-liners It is often useful to type a simple program at the command line for use within . . . sh awk -f foobar.awk }}} === Using a shebang (hashbang) As with other Unix scripts, an [[awk]] script . . . can be started using a [[hashbang]]. However, because of the syntax of the [[awk]] . . . is necessary to include a the -f switch in the [[hashbang]] line as follows: {{{ sh #!/usr/bin/awk -f . . .
1K - last updated 2008-12-31 11:34 UTC by pgas
Overview
= Overview of awk = == The primarily purpose of awk is to processing textual data to produce formatted . . . * [[rule]]s * [[function]] definitions * [[hashbang]] == The awk utility performs a cycle of pattern . . .
4K - last updated 2011-05-23 23:09 UTC by markhobley
PrimeNumberSieve
This is the standard sieve of Eratosthenes implemented in portable awk. The running time of the bare . . . would be any speed advantage in bypassing the hashing performed on all keys that index into arrays . . . (integers are converted to strings and then hashed; all array keys are strings, all the time, no . . . a lower constant factor than arrays, since no hashing is required. But do numbered fields deliver . . . strings, and therefore must all pass through the hash function (numeric keys must suffer the extra indignity . . .
4K - last updated 2008-06-19 05:56 UTC by gnomon
symbol
| *Symbol* | *Name* | *Purpose* | !! | [[pling]] | logical NOT | " | [[doublequote]] | | # | [[hash]] . . .
2K - last updated 2013-02-19 14:26 UTC by markhobley
WartAndWishList
Awk is a wonderful language! That said, there are a few annoying bits... == The Good * well-documented . . . numbers are first converted to strings and then hashed. This is a language problem, not an implementation . . . where a simple array could be used instead of a hash table: Lua versions prior to 5.x used awk-style . . . hash-backed tables, but the 5.x series has implemented . . . data structure, containing both a traditional hash table and an array. The array stores contiguous . . .
7K - last updated 2009-04-13 18:39 UTC by goedel
15 pages found.