AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . * [[RS]] * [[rule]]s * [[search pattern]]s * [[special variable]]s * [[statement]]s * [[string]]s . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
AwkTips
<toc> ---- == Be idiomatic! In this paragraph, we give some hints on how to write more idiomatic . . . they are specified on the command line. The special variable NR stores the total number of input . . .
31K - last updated 2009-03-24 16:54 UTC by waldner
BEGIN
== Begin Blocks The [[awk]] programming language allows us to use **begin blocks** and **end blocks** . . . are executed in order that they are defined. == Special Variables === FILENAME Normally the FILENAME . . .
3K - last updated 2013-04-11 14:25 UTC by 92.40.253.171.threembb.co.uk
dollarint
A [[dollar]] sign and followed by an [[integer]] are used to refer to [[field]]s within the current [[record]]: . . . by making an [[assign]]ment to the dollarint [[special variable]]: {{{ awk { $2 = 23 } # Change field . . .
3K - last updated 2011-06-25 05:28 UTC by pgas
field
In [[awk]] all [[input]] is separated into [[record]]s and each [[record]] is further divided into fields. . . . == Fields are referenced using special variables == Within the [[awk]] script, each . . .
1K - last updated 2011-06-25 05:31 UTC by pgas
FNR
The *FNR* informative [[special variable]] is used to track the number of [[record]]s that have so far . . . === Adding line numbers to a file === The FNR [[special variable]] can be wielded to give a simple . . .
1K - last updated 2011-05-08 11:04 UTC by markhobley
FS
= Field Separator = The [[special variable]] FS is a field separator that is used to determine how [[awk]] . . .
5K - last updated 2013-02-19 21:45 UTC by markhobley
getline
The *getline* command can obtain input from any number of files and does not require a command line parameter . . . occurs during the [[getline]] operation, the special variable [[ERRNO]] should becomes set and the . . .
1K - last updated 2011-05-02 20:14 UTC by markhobley
input
The [[awk]] utility can take its input from [[standard input]] or from [[file]]s. If no input files are . . . the filename as a command line parameter. == Special variables related to input == The following . . . [[special variable]]s are related to input: | *Variable* . . .
2K - last updated 2011-05-19 22:40 UTC by markhobley
NF
= Number of Fields = The [[special variable]] NF holds the number of [[field]]s in the [[current record]]. . . .
1K - last updated 2011-05-28 15:14 UTC by markhobley
read only variable
=== _User defined variables cannot be marked as readonly_ The [[awk]] extraction and reporting language . . . defining readonly variables. === _Informative special variables_ Some informative [[special variable]]s . . .
1K - last updated 2011-06-01 21:29 UTC by markhobley
RS
= Record Separator = The [[special variable]] RS is a record separator that is used to determine how . . .
3K - last updated 2013-02-19 23:11 UTC by markhobley
special variable
Some [[variable]] names have a special meaning to the awk interpreter. == List of special variables == . . . The following are '''special variables''' within [[awk]]: | '''Variable''' . . .
2K - last updated 2011-06-25 05:46 UTC by pgas
variable
A '''variable''' is a symbolic name associated with a [[value]]. A variable acts as a container and the . . . named %s, %s and %s.\n", dog, Dog, DOG } }}} === Special variables === Some names are used for [[special . . .
3K - last updated 2012-04-22 11:42 UTC by unregistered
14 pages found.