AwkGuide
** Work in Progress ** {{{ import from Mark Hobley's wiki }}} <toc> ---- == Overview * [[Overview]] . . . * [[number]]s * [[operator]]s * [[output]] * [[parentheses]] * [[pattern]]s * [[precedence]] * [[print]] . . .
4K - last updated 2011-08-14 15:57 UTC by markhobley
BackslashInRegexp
Because {{{"\\$"}}} is a string and {{{/\\$/}}} is not; in strings, some of the escape characters get . . . or over-quoting should be avoided: * Parentheses are special for alternation: {{{ /\(test\)/ . . .
2K - last updated 2008-11-26 12:27 UTC by pgas
comp.lang.awk FAQ
This material of this faq originates from the comp.lang.awk FAQ that you can find there: * http://www.faqs.org/faqs/computer-lang/awk/faq/ . . . Why doesn't "\\$" behave like /\\$/ ? Why don't parentheses match? <include "BackslashInRegexp"> . . .
8K - last updated 2009-03-04 12:42 UTC by pgas
compound assignment operator
The *compound assignment operators* (also called *combination assignment operators*) provide a more concise . . . are used within an [[expression]]. Without [[parentheses]], the compound assignment operators may . . .
2K - last updated 2011-03-27 09:46 UTC by markhobley
ConcatenationPrecedence
You'd expect `6 -22', but you get `6-22'. It's because the `" " -22' is grouped first, as a substraction . . . giving the string `6-22'. Gentle application of parentheses will avoid this. . . .
1K - last updated 2008-12-15 12:37 UTC by pgas
dollarint
A [[dollar]] sign and followed by an [[integer]] are used to refer to [[field]]s within the current [[record]]: . . . sign to specify the field number. Note that [[parentheses]] are used around the [[expression]], to . . . awk print $(3 + 2) # output field number 5 # The parentheses above are important. # Without parentheses, . . .
3K - last updated 2011-06-25 05:28 UTC by pgas
field reference
== The field reference operator == The [[dollar]] symbol acts as a unary *field reference operator* and . . . sign to specify the field number. Note that [[parentheses]] are used around the [[expression]], to . . . {{{ print $(3 + 2) # output field number 5 # The parentheses above are important. # Without parentheses, . . .
2K - last updated 2011-06-28 09:12 UTC by markhobley
iterative loop
An '''iterative loop''' repeatedly executes a set of instructions as the [iterator] steps through a series . . . { print l } } === _Elements of a for loop_ The [parentheses] contains three elements: * Initialization . . .
2K - last updated 2011-08-13 21:00 UTC by markhobley
length
== Usage == === length ([ STRING ]) === The **length** function returns the number of characters within . . . } }}} === Parentheses === In traditional versions of awk, the . . . optional [[parentheses]] enclosures can be omitted from the string . . . this legacy form of syntax is deprecated and [[parentheses]] enclosures should always be used in current . . .
1K - last updated 2011-06-25 05:11 UTC by pgas
LshalOutputParser
=== Problem Specification 10:50 <Thanatermesis> i want to obtain the model of the disk, for example, . . . RSTART+1, RLENGTH-2) # offsets to remove parentheses val = trim(substr($2, 1, (length($2) - . . .
3K - last updated 2008-06-27 16:22 UTC by gnomon
parentheses
== Grouping components of boolean expressions == Components of boolean expressions can be grouped together . . . using parentheses: == Passing arguments to functions == Arguments . . . passed to functions should be enclosed in parentheses: == Conditional constructs == Parentheses . . .
1K - last updated 2010-11-09 00:48 UTC by markhobley
precedence
The [[awk]] programming language uses rules of *precedence* to determine the order in which [[operator]]s . . . is done before addition }}} == _Using parentheses to control the order of evaluation_ It . . . an [[expression]] are evaluated by using [[parentheses]] enclosures. In the following example, . . . produces a value of 35, because the [[parentheses]] have a higher precedence than [[multiplication]], . . . are evaluated first: {{{ print (3 + 4) * 5 # The parentheses cause the addition to be evaluated before . . .
7K - last updated 2013-04-11 06:58 UTC by markhobley
printf
== Usage == === printf [ FORMAT, LIST ] === The **printf** [[variadic]] function provides generic [[string . . . list to printf can optionally be enclosed in [[parentheses]]. === Example Usage === Print all the . . .
2K - last updated 2011-06-09 20:34 UTC by markhobley
symbol
| *Symbol* | *Name* | *Purpose* | !! | [[pling]] | logical NOT | " | [[doublequote]] | | # | [[hash]] . . . referencing | [[brace]]s | | [[cheveron]]s | | [[parentheses]] | | [[slash]] | regular expression enclosures . . .
2K - last updated 2013-02-19 14:26 UTC by markhobley
14 pages found.